j
Dependencies: mbed yeswecancoap C12832 LM75B
lib/RGB.h@1:92958e26bf2e, 2015-10-23 (annotated)
- Committer:
- arnedesmet
- Date:
- Fri Oct 23 14:58:08 2015 +0000
- Revision:
- 1:92958e26bf2e
- Parent:
- 0:92d2ef9f009d
mlkj;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
arnedesmet | 0:92d2ef9f009d | 1 | |
arnedesmet | 0:92d2ef9f009d | 2 | #ifndef RGB_H |
arnedesmet | 0:92d2ef9f009d | 3 | #define RGB_H |
arnedesmet | 0:92d2ef9f009d | 4 | #include "mbed.h" |
arnedesmet | 0:92d2ef9f009d | 5 | #include "Color.h" |
arnedesmet | 0:92d2ef9f009d | 6 | |
arnedesmet | 0:92d2ef9f009d | 7 | class RGB{ |
arnedesmet | 0:92d2ef9f009d | 8 | public: |
arnedesmet | 0:92d2ef9f009d | 9 | RGB(PinName r_pin, PinName g_pin, PinName b_pin); |
arnedesmet | 0:92d2ef9f009d | 10 | |
arnedesmet | 0:92d2ef9f009d | 11 | void setColor(Color color); |
arnedesmet | 0:92d2ef9f009d | 12 | void setColor(int red, int green, int blue); |
arnedesmet | 0:92d2ef9f009d | 13 | void setColor(int Color); |
arnedesmet | 0:92d2ef9f009d | 14 | |
arnedesmet | 1:92958e26bf2e | 15 | Color* color; |
arnedesmet | 1:92958e26bf2e | 16 | |
arnedesmet | 0:92d2ef9f009d | 17 | Color* getColor(); |
arnedesmet | 0:92d2ef9f009d | 18 | void off(); |
arnedesmet | 0:92d2ef9f009d | 19 | private: |
arnedesmet | 0:92d2ef9f009d | 20 | PwmOut* r_out; |
arnedesmet | 0:92d2ef9f009d | 21 | PwmOut* g_out; |
arnedesmet | 0:92d2ef9f009d | 22 | PwmOut* b_out; |
arnedesmet | 0:92d2ef9f009d | 23 | |
arnedesmet | 0:92d2ef9f009d | 24 | float toFloat(int intValue); |
arnedesmet | 0:92d2ef9f009d | 25 | |
arnedesmet | 0:92d2ef9f009d | 26 | |
arnedesmet | 0:92d2ef9f009d | 27 | }; |
arnedesmet | 0:92d2ef9f009d | 28 | |
arnedesmet | 0:92d2ef9f009d | 29 | #endif |