Drives a strip of serial RGB LEDs (WS2812) through SPI port (mosi: p5).

Dependencies:   BurstSPI

Dependents:   colorsExample

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers colors.h Source File

colors.h

00001 #include "mbed.h"
00002 #include "BurstSPI.h"
00003 
00004 class Colors {
00005 public:
00006     void setup(int n);
00007     void send(unsigned char data[][3]);
00008 private:
00009     void sendOne(unsigned char r, unsigned char g, unsigned char b);
00010     int num;
00011 };