Class available to make using NeoPixel lights very simple

Dependencies:   PixelArray

Dependents:   NeoPixelEasy

easyNeo.h

Committer:
dannellyz
Date:
2015-02-15
Revision:
4:3a9cfb1ab658
Parent:
3:fb34ddc9441f
Child:
5:f9b8a3a241b1

File content as of revision 4:3a9cfb1ab658:

/*! 
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);
    /** Set the colors of the lights with a continuous hex string
        String should have 6 hex characters for each light corresponding 
        to their R,G and then B vlues you wish to set.
      * @param hexString above mentioned string.
      */
    void setByHex(char*);
    
    void clear();
    
    void update(neopixel::Pixel * buffer);
    
    uint8_t c2i(char );
};