Alexander De Geeter / Rgb

Dependents:   coap

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 #include "mbed.h"
00004 #include "color.h"
00005 #include "LM75B.h"
00006 
00007 class RGB{
00008     
00009     
00010     public:
00011     
00012     RGB(PinName r_pin, PinName g_pin, PinName b_pin);
00013     void setColor(Color color);
00014     void setColor(int red, int green, int blue);
00015     void setColor(int color);
00016     void off();
00017     
00018     private:
00019     PwmOut* r_out;
00020     PwmOut* g_out;
00021     PwmOut* b_out;
00022     float toFloat(int floater);
00023     };
00024 
00025 #endif