PRO2_Team 1_collected code with ticker and headers_not working yet

Dependencies:   SHTx mbed

Fork of PRO2_samlet_kode by Olga Høyer

rgb_led.h

Committer:
OlgaHoeyer
Date:
2017-06-20
Revision:
11:3ff48fb0aa0b
Parent:
7:75d5c1db2027

File content as of revision 11:3ff48fb0aa0b:

/*
--------------------------------------------------------------------------------
-- Project:         PRO2 "Awareness and Optimisation of energy consumption"
-- Team:            Team 1

-- File Name:       rgb_led.h
-- Author:          Poul Erik Tjørnfelt
-- Date:            07/05-2017
-- Copyright:       Open to all
-- Version:         0.6 - Creation of file.
--                  1.0 - File approval.
--
-- Description:     The header file for a class, that creates instances of
--                  the actual RGB lamp that is used.
--
--------------------------------------------------------------------------------
*/

#ifndef RGB_LED_H
#define RGB_LED_H
#include "mbed.h"

class RGB_LED
{
public:
    RGB_LED(PinName pin_R, PinName pin_G, PinName pin_B);
    void set(float red, float green, float blue);
    void flash(float period, float on_timer);

private:
    PwmOut pin_r;
    PwmOut pin_g;
    PwmOut pin_b;
};

#endif