FastLED 3.9.15
Loading...
Searching...
No Matches
OctoWS2811_impl.h
Go to the documentation of this file.
1
2// BasicTest example to demonstrate how to use FastLED with OctoWS2811
3//
4// @note OctoWS2811 is only supported on Teensy 3.x and Teensy 4.x
5// (not Teensy LC due to hardware limitations)
6//
7// FastLED does not directly support Teensy 4.x PinList (for any
8// number of pins) but it can be done with edits to FastLED code:
9// https://www.blinkylights.blog/2021/02/03/using-teensy-4-1-with-fastled/
10
11#include <OctoWS2811.h>
12
13#define USE_OCTOWS2811
14#include <FastLED.h>
15
16
17#define NUM_LEDS 1920
18
20
21#define RED 0xFF0000
22#define GREEN 0x00FF00
23#define BLUE 0x0000FF
24#define YELLOW 0xFFFF00
25#define PINK 0xFF1088
26#define ORANGE 0xE05800
27#define WHITE 0xFFFFFF
28
29void setup() {
30 Serial.begin(9600);
31 Serial.println("ColorWipe Using FastLED");
33 FastLED.setBrightness(60);
34}
35
36
37
38void colorWipe(int color, int wait)
39{
40 for (int i=0; i < NUM_LEDS; i++) {
41 leds[i] = color;
42 FastLED.show();
43 ::delayMicroseconds((uint32_t)wait);
44 }
45}
46
47
48void loop() {
49 int microsec = 6000000 / NUM_LEDS;
50 colorWipe(RED, microsec);
51 colorWipe(GREEN, microsec);
52 colorWipe(BLUE, microsec);
53 colorWipe(YELLOW, microsec);
54 colorWipe(PINK, microsec);
55 colorWipe(ORANGE, microsec);
56 colorWipe(WHITE, microsec);
57}
#define NUM_LEDS
fl::CRGB leds[NUM_LEDS]
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
@ OCTOWS2811
Definition FastLED.h:280
void setup()
#define BLUE
#define WHITE
void colorWipe(int color, int wait)
#define RED
#define YELLOW
#define ORANGE
#define GREEN
#define PINK
void loop()
constexpr EOrder GRB
Definition eorder.h:19
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Definition crgb.h:38
#define Serial
Definition serial.h:304