Class available to make using NeoPixel lights very simple

Dependencies:   PixelArray

Dependents:   NeoPixelEasy

easyNeo.h

Committer:
dannellyz
Date:
2015-02-15
Revision:
1:f401535caf70
Parent:
0:cfbe334f4b1c
Child:
3:fb34ddc9441f

File content as of revision 1:f401535caf70:

/* 
Class to use the NeoPixels on an mbed with ease
 */
#include "mbed.h"
#include "neopixel.h"

/** Interface to work with Adafruit NeoPixel lights */
class easyNeo
{
private:
    int numLeds;
public:
    /**Configure simple with the number of lights in the series*/
    easyNeo(int numLeds);

    void setPixel(neopixel::Pixel * buffer, uint32_t, uint8_t, uint8_t, uint8_t, uint32_t);
    
    void lightTest();

    void setByColor(int ledNum, char* color);
    
    void setByHex(char*);
    
    void clear();
    
    void update(neopixel::Pixel * buffer);
    
    uint8_t c2i(char );
};