Class available to make using NeoPixel lights very simple
easyNeo.h
- Committer:
- dannellyz
- Date:
- 2015-02-15
- Revision:
- 5:f9b8a3a241b1
- Parent:
- 4:3a9cfb1ab658
- Child:
- 6:2d59dae9531d
File content as of revision 5:f9b8a3a241b1:
/*! 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 ); int ConfigMode(); /** Gets the serial number/mac address of the Xbee and places it into serial_no. * @param serial_no array to store the serial of Xbee (must be 8 long). * @return Returns 1 on success. */ int GetSerial(int*); /** Sets the encryption key. This should be a 128-bit key. * @param key Pointer to the network key to set. * @return Returns 1 on success. */ };