Driver for the GE Color Effects LED lights. Currently it is blocking, but it could be made to be nonblocking.
Dependents: GEColorEffects_Example GEColorEffects_Example
This library's code is based on Clark Jarvis's program here: http://developer.mbed.org/users/clarkjarvis/code/FRDM_GE_ColorEffects/
Diff: GEColorEffects.h
- Revision:
- 0:3f51641c4e69
- Child:
- 1:e56bc0a8c273
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GEColorEffects.h Mon Feb 16 20:27:53 2015 +0000 @@ -0,0 +1,23 @@ +#ifndef GE_COLOR_EFFECTS_H +#define GE_COLOR_EFFECTS_H + +#include "mbed.h" + +class GEColorEffects { + +public: + GEColorEffects(PinName pin, int size); + void write(int buf[], bool eightBit); + +private: + int size; + DigitalOut gpo; + + void sendZero(); + void sendOne(); + void sendData(unsigned char data, int length); + void sendFrame(unsigned char address, unsigned char lumm, unsigned char R, unsigned char G, unsigned char B); + void endFrame(); +}; + +#endif \ No newline at end of file