Drives a strip of serial RGB LEDs (WS2812) through SPI port (mosi: p5).
Diff: colors.h
- Revision:
- 0:f7ac8595c47a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/colors.h Sat May 23 01:31:14 2015 +0000 @@ -0,0 +1,11 @@ +#include "mbed.h" +#include "BurstSPI.h" + +class Colors { +public: + void setup(int n); + void send(unsigned char data[][3]); +private: + void sendOne(unsigned char r, unsigned char g, unsigned char b); + int num; +};