test

Dependencies:   LM75B Color mbed yeswecancoap Rgb

Committer:
de_geeter_alexander
Date:
Fri Oct 23 13:37:50 2015 +0000
Revision:
0:06473a4ace3b
test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
de_geeter_alexander 0:06473a4ace3b 1 #ifndef RGB_H
de_geeter_alexander 0:06473a4ace3b 2 #define RGB_H
de_geeter_alexander 0:06473a4ace3b 3 #include "mbed.h"
de_geeter_alexander 0:06473a4ace3b 4 #include "color.h"
de_geeter_alexander 0:06473a4ace3b 5 #include "LM75B.h"
de_geeter_alexander 0:06473a4ace3b 6
de_geeter_alexander 0:06473a4ace3b 7 class RGB{
de_geeter_alexander 0:06473a4ace3b 8
de_geeter_alexander 0:06473a4ace3b 9
de_geeter_alexander 0:06473a4ace3b 10 public:
de_geeter_alexander 0:06473a4ace3b 11
de_geeter_alexander 0:06473a4ace3b 12 RGB(PinName r_pin, PinName g_pin, PinName b_pin);
de_geeter_alexander 0:06473a4ace3b 13 void setColor(Color color);
de_geeter_alexander 0:06473a4ace3b 14 void setColor(int red, int green, int blue);
de_geeter_alexander 0:06473a4ace3b 15 void setColor(int color);
de_geeter_alexander 0:06473a4ace3b 16 void off();
de_geeter_alexander 0:06473a4ace3b 17
de_geeter_alexander 0:06473a4ace3b 18 private:
de_geeter_alexander 0:06473a4ace3b 19 PwmOut* r_out;
de_geeter_alexander 0:06473a4ace3b 20 PwmOut* g_out;
de_geeter_alexander 0:06473a4ace3b 21 PwmOut* b_out;
de_geeter_alexander 0:06473a4ace3b 22 float toFloat(int floater);
de_geeter_alexander 0:06473a4ace3b 23 };
de_geeter_alexander 0:06473a4ace3b 24
de_geeter_alexander 0:06473a4ace3b 25 #endif