Class available to make using NeoPixel lights very simple
Diff: easyNeo.h
- Revision:
- 0:cfbe334f4b1c
- Child:
- 1:f401535caf70
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/easyNeo.h Sun Feb 15 21:12:13 2015 +0000 @@ -0,0 +1,30 @@ +/* +Class to use the NeoPixels on an mbed with ease + */ +#include "mbed.h" +#include "neopixel.h" + +/** Xbee interface class for configuring, sending and recieving data using an Xbee */ +class easyNeo +{ +private: + int numLeds; +public: + /** Configure serial data pin and number of LEDs + */ + 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 ); +}; \ No newline at end of file