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/

GEColorEffects.h

Committer:
bridadan
Date:
2015-02-16
Revision:
0:3f51641c4e69
Child:
1:e56bc0a8c273

File content as of revision 0:3f51641c4e69:

#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