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

Dependencies:   BurstSPI

Dependents:   colorsExample

colors.h

Committer:
xkozima
Date:
2015-05-23
Revision:
0:f7ac8595c47a

File content as of revision 0:f7ac8595c47a:

#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;
};