Library for the WS2812 LED Driver. Uses bit banging and nops for precise timing. Number of nops executed are configurable at run time.
Revision 3:31c18f8b2ddf, committed 2020-06-24
- Comitter:
- turumputum
- Date:
- Wed Jun 24 12:41:31 2020 +0000
- Parent:
- 2:6e647820f587
- Commit message:
- good for me
Changed in this revision
| leds.h | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/leds.h Wed Jun 24 12:41:31 2020 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+#include "PixelArray.h"
+#include "WS2812.h"
+#include "config.h"
+
+#define LedOff 0
+#define LedWait 1
+#define LedOn 3
+#define LedBlink 4
+#define LedRun 5
+
+
+class LedGroupInside
+{
+public:
+ LedGroupInside(PinName pin, int placeInTable, int size);
+ //~LedGroup();
+ void light(int mode, int gS);
+private:
+ PinName __outPin;
+ int __mode;
+ int __placeInTable;
+ int __size;
+ PixelArray __pa;
+ WS2812 __leds;
+};
+
+
+int color_set(uint8_t red,uint8_t green, uint8_t blue);
+void startUp_Led();
+void fadeEffect();
+void lightLeds(int gS);
\ No newline at end of file