A library for SPI control of adafruit's neopixel ring and addressable LEDs.
Dependents: TI_NEOPIXEL_SPI_SAMPLE
TI_NEOPIXEL_SPI.h
- Committer:
- tichise
- Date:
- 2019-07-28
- Revision:
- 2:0148ac5c90fa
- Parent:
- 0:c28aa7d4f97e
- Child:
- 3:f0859c280204
- Child:
- 5:69bb2a2fa11f
File content as of revision 2:0148ac5c90fa:
#ifndef MBED_TI_NEOPIXEL_SPI_H #define MBED_TI_NEOPIXEL_SPI_H #include "mbed.h" #include "neopixel.h" typedef struct rgbColor { uint8_t red; uint8_t green; uint8_t blue; } rgbColor; class TI_NEOPIXEL_SPI { public: TI_NEOPIXEL_SPI(PinName input); void switchLightOff(int count); void switchLightOn(int count, int startCount, int endCount, rgbColor rgbColor); void changeColor(int count, int startCount, int endCount, rgbColor rgbColor); void changePointColor(int count, int topIndex, int endIndex, rgbColor topColor, rgbColor bottomColor); void circle(int count, int startCount, int endCount, rgbColor rgbColor); void chase(int count, int bufferCount, rgbColor c1, rgbColor c2); void chaseRainbow(int count); void circleRainbow(int count); rgbColor convertHsvToRgb(float h, float s, float v); private: neopixel::PixelArray _ledStrip; }; #endif