Alexander De Geeter / Mbed 2 deprecated RGB-LED

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers rgb.h Source File

rgb.h

00001 #ifndef RGB_H
00002 #define RGB_H
00003 
00004 #include "mbed.h"
00005 #include "color.h"
00006 
00007 class Rgb {
00008  public:
00009     Rgb(PinName r_pin, PinName g_pin, PinName b_pin);
00010     //void setColor(Color* color);
00011     void setColor(int red, int green, int blue);
00012     void setColor(int color);
00013     //Color* getColor(void);
00014     void off(void);
00015     
00016  private:
00017  /*
00018     PinName r_pin;
00019     PinName g_pin;
00020     PinName b_pin;      
00021    */
00022     PwmOut* rout;
00023     PwmOut* gout;
00024     PwmOut* bout;
00025     int Pwmout;
00026     /*
00027     int Rout;
00028     int Gout;
00029     int Bout;
00030     */
00031 };
00032 
00033 #endif