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// FastLED does not directly support Teensy 4.x PinList (for any
5// number of pins) but it can be done with edits to FastLED code:
6// https://www.blinkylights.blog/2021/02/03/using-teensy-4-1-with-fastled/
7
8#include <OctoWS2811.h>
9
10#define USE_OCTOWS2811
11#include <FastLED.h>
12
13using namespace fl;
14
15#define NUM_LEDS 1920
16
18
19#define RED 0xFF0000
20#define GREEN 0x00FF00
21#define BLUE 0x0000FF
22#define YELLOW 0xFFFF00
23#define PINK 0xFF1088
24#define ORANGE 0xE05800
25#define WHITE 0xFFFFFF
26
27void setup() {
28 Serial.begin(9600);
29 Serial.println("ColorWipe Using FastLED");
31 FastLED.setBrightness(60);
32}
33
34
35
36void colorWipe(int color, int wait)
37{
38 for (int i=0; i < NUM_LEDS; i++) {
39 leds[i] = color;
40 FastLED.show();
41 delayMicroseconds(wait);
42 }
43}
44
45
46void loop() {
47 int microsec = 6000000 / NUM_LEDS;
48 colorWipe(RED, microsec);
49 colorWipe(GREEN, microsec);
50 colorWipe(BLUE, microsec);
51 colorWipe(YELLOW, microsec);
52 colorWipe(PINK, microsec);
53 colorWipe(ORANGE, microsec);
54 colorWipe(WHITE, microsec);
55}
CRGB leds[NUM_LEDS]
#define NUM_LEDS
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:74
@ OCTOWS2811
Definition FastLED.h:139
central include file for FastLED, defines the CFastLED class/object
void setup()
#define BLUE
#define WHITE
void colorWipe(int color, int wait)
#define RED
#define YELLOW
#define ORANGE
#define GREEN
#define PINK
void loop()
@ GRB
Green, Red, Blue (0102)
Definition eorder.h:16
IMPORTANT!
Definition crgb.h:20
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86