Class available to make using NeoPixel lights very simple

Dependencies:   PixelArray

Dependents:   NeoPixelEasy

Committer:
dannellyz
Date:
Sun Feb 15 21:12:13 2015 +0000
Revision:
0:cfbe334f4b1c
Child:
1:f401535caf70
round1 easyNeo class for NeoPixel leds;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dannellyz 0:cfbe334f4b1c 1 /*
dannellyz 0:cfbe334f4b1c 2 Class to use the NeoPixels on an mbed with ease
dannellyz 0:cfbe334f4b1c 3 */
dannellyz 0:cfbe334f4b1c 4 #include "mbed.h"
dannellyz 0:cfbe334f4b1c 5 #include "neopixel.h"
dannellyz 0:cfbe334f4b1c 6
dannellyz 0:cfbe334f4b1c 7 /** Xbee interface class for configuring, sending and recieving data using an Xbee */
dannellyz 0:cfbe334f4b1c 8 class easyNeo
dannellyz 0:cfbe334f4b1c 9 {
dannellyz 0:cfbe334f4b1c 10 private:
dannellyz 0:cfbe334f4b1c 11 int numLeds;
dannellyz 0:cfbe334f4b1c 12 public:
dannellyz 0:cfbe334f4b1c 13 /** Configure serial data pin and number of LEDs
dannellyz 0:cfbe334f4b1c 14 */
dannellyz 0:cfbe334f4b1c 15 easyNeo(int numLeds);
dannellyz 0:cfbe334f4b1c 16
dannellyz 0:cfbe334f4b1c 17 void setPixel(neopixel::Pixel * buffer, uint32_t, uint8_t, uint8_t, uint8_t, uint32_t);
dannellyz 0:cfbe334f4b1c 18
dannellyz 0:cfbe334f4b1c 19 void lightTest();
dannellyz 0:cfbe334f4b1c 20
dannellyz 0:cfbe334f4b1c 21 void setByColor(int ledNum, char* color);
dannellyz 0:cfbe334f4b1c 22
dannellyz 0:cfbe334f4b1c 23 void setByHex(char*);
dannellyz 0:cfbe334f4b1c 24
dannellyz 0:cfbe334f4b1c 25 void clear();
dannellyz 0:cfbe334f4b1c 26
dannellyz 0:cfbe334f4b1c 27 void update(neopixel::Pixel * buffer);
dannellyz 0:cfbe334f4b1c 28
dannellyz 0:cfbe334f4b1c 29 uint8_t c2i(char );
dannellyz 0:cfbe334f4b1c 30 };