A library for SPI control of adafruit's neopixel ring and addressable LEDs.

Dependencies:   PixelArray

Dependents:   TI_NEOPIXEL_SPI_SAMPLE

Revision:
0:c28aa7d4f97e
Child:
2:0148ac5c90fa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TI_NEOPIXEL_SPI.h	Tue Jul 09 15:25:16 2019 +0000
@@ -0,0 +1,33 @@
+#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);
+
+  void changeColor(int count, rgbColor rgbColor);
+  void changePointColor(int count, rgbColor topColor, rgbColor bottomColor);
+
+  void circle(int count, rgbColor rgbColor);
+  void chase(int count, int bufferCount, rgbColor c1, rgbColor c2);
+  void circleRainbow(int count);
+  rgbColor convertHsvToRgb(float h, float s, float v);
+
+private:
+  neopixel::PixelArray _ledStrip;
+};
+
+#endif
\ No newline at end of file