Class available to make using NeoPixel lights very simple

Dependencies:   PixelArray

Dependents:   NeoPixelEasy

Committer:
dannellyz
Date:
Sun Feb 15 21:15:24 2015 +0000
Revision:
1:f401535caf70
Parent:
0:cfbe334f4b1c
Child:
3:fb34ddc9441f
comments;

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 1:f401535caf70 7 /** Interface to work with Adafruit NeoPixel lights */
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 1:f401535caf70 13 /**Configure simple with the number of lights in the series*/
dannellyz 0:cfbe334f4b1c 14 easyNeo(int numLeds);
dannellyz 0:cfbe334f4b1c 15
dannellyz 0:cfbe334f4b1c 16 void setPixel(neopixel::Pixel * buffer, uint32_t, uint8_t, uint8_t, uint8_t, uint32_t);
dannellyz 0:cfbe334f4b1c 17
dannellyz 0:cfbe334f4b1c 18 void lightTest();
dannellyz 0:cfbe334f4b1c 19
dannellyz 0:cfbe334f4b1c 20 void setByColor(int ledNum, char* color);
dannellyz 0:cfbe334f4b1c 21
dannellyz 0:cfbe334f4b1c 22 void setByHex(char*);
dannellyz 0:cfbe334f4b1c 23
dannellyz 0:cfbe334f4b1c 24 void clear();
dannellyz 0:cfbe334f4b1c 25
dannellyz 0:cfbe334f4b1c 26 void update(neopixel::Pixel * buffer);
dannellyz 0:cfbe334f4b1c 27
dannellyz 0:cfbe334f4b1c 28 uint8_t c2i(char );
dannellyz 0:cfbe334f4b1c 29 };