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
19
fl::CRGB
leds
[
NUM_LEDS
];
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
29
void
setup
() {
30
Serial
.begin(9600);
31
Serial
.println(
"ColorWipe Using FastLED"
);
32
FastLED
.addLeds<
OCTOWS2811
,
GRB
>(
leds
,
NUM_LEDS
/8);
33
FastLED
.setBrightness(60);
34
}
35
36
37
38
void
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
48
void
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
}
NUM_LEDS
#define NUM_LEDS
Definition
Animartrix.ino:79
leds
fl::CRGB leds[NUM_LEDS]
Definition
Animartrix.ino:93
FastLED
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition
FastLED.cpp.hpp:75
OCTOWS2811
@ OCTOWS2811
Definition
FastLED.h:280
setup
void setup()
Definition
OctoWS2811_impl.h:29
BLUE
#define BLUE
Definition
OctoWS2811_impl.h:23
WHITE
#define WHITE
Definition
OctoWS2811_impl.h:27
colorWipe
void colorWipe(int color, int wait)
Definition
OctoWS2811_impl.h:38
RED
#define RED
Definition
OctoWS2811_impl.h:21
YELLOW
#define YELLOW
Definition
OctoWS2811_impl.h:24
ORANGE
#define ORANGE
Definition
OctoWS2811_impl.h:26
GREEN
#define GREEN
Definition
OctoWS2811_impl.h:22
PINK
#define PINK
Definition
OctoWS2811_impl.h:25
loop
void loop()
Definition
OctoWS2811_impl.h:48
GRB
constexpr EOrder GRB
Definition
eorder.h:19
fl::CRGB
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Definition
crgb.h:38
Serial
#define Serial
Definition
serial.h:304
examples
SpecialDrivers
Teensy
OctoWS2811
OctoWS2811
OctoWS2811_impl.h
Generated on Tue Jun 16 2026 00:06:58 for FastLED by
1.13.2