Projekte_werkstatt
/
Mbed-Mensch-3-Menu
Fork of Mbed-Mensch-1 by
Diff: Led/WS2812B.h
- Revision:
- 5:f4db4cd245e3
- Parent:
- 1:0eaa7682f7e1
diff -r 2acb70f9cd22 -r f4db4cd245e3 Led/WS2812B.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Led/WS2812B.h Fri Mar 11 07:47:58 2016 +0000 @@ -0,0 +1,28 @@ +#include "mbed.h" + +class LedOut +{ + public: + LedOut(PinName pin); + void WriteLed(uint32_t leddata); + private: + DigitalOut Output; + void writeledbit(char wert); +}; + +uint32_t Brightness(uint32_t Colour,char Brightness); + +class RGBOut +{ +public: + RGBOut(PinName rPin,PinName gPin,PinName bPin); + void set(float r,float g,float b); + void set_RGB(uint32_t leddata); + void set_r(float r); + void set_g(float g); + void set_b(float b); +private: + PwmOut Rout; + PwmOut Gout; + PwmOut Bout; +};