FastLED
3.9.15
Loading...
Searching...
No Matches
OctoWS2811Demo.h
Go to the documentation of this file.
1
2
3
10
11
#define USE_OCTOWS2811
12
#include <OctoWS2811.h>
13
#include <FastLED.h>
14
15
#define NUM_LEDS_PER_STRIP 64
16
#define NUM_STRIPS 8
17
18
CRGB
leds
[
NUM_STRIPS
*
NUM_LEDS_PER_STRIP
];
19
20
// Pin layouts on the teensy 3:
21
// OctoWS2811: 2,14,7,8,6,20,21,5
22
23
void
setup
() {
24
FastLED
.addLeds<
OCTOWS2811
>(
leds
,
NUM_LEDS_PER_STRIP
);
25
FastLED
.setBrightness(32);
26
}
27
28
void
loop
() {
29
static
uint8_t
hue
= 0;
// okay static in header
30
for
(
int
i = 0; i <
NUM_STRIPS
; i++) {
31
for
(
int
j = 0; j <
NUM_LEDS_PER_STRIP
; j++) {
32
leds
[(i*
NUM_LEDS_PER_STRIP
) + j] =
CHSV
((32*i) +
hue
+j,192,255);
33
}
34
}
35
36
// Set the first n leds on each strip to show which strip it is
37
for
(
int
i = 0; i <
NUM_STRIPS
; i++) {
38
for
(
int
j = 0; j <= i; j++) {
39
leds
[(i*
NUM_LEDS_PER_STRIP
) + j] =
CRGB::Red
;
40
}
41
}
42
43
hue
++;
44
45
FastLED
.show();
46
FastLED
.delay(10);
47
}
leds
fl::CRGB leds[NUM_LEDS]
Definition
Animartrix.ino:93
NUM_LEDS_PER_STRIP
#define NUM_LEDS_PER_STRIP
Definition
ArrayOfLedArrays.ino:15
NUM_STRIPS
#define NUM_STRIPS
Definition
ArrayOfLedArrays.ino:14
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
OctoWS2811Demo.h:23
loop
void loop()
Definition
OctoWS2811Demo.h:28
hue
uint8_t hue
Definition
advanced.h:94
CHSV
fl::hsv8 CHSV
Definition
chsv.h:11
CRGB
fl::CRGB CRGB
Definition
crgb.h:25
fl::CRGB::Red
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
Definition
crgb.h:622
examples
SpecialDrivers
Teensy
OctoWS2811
OctoWS2811Demo
OctoWS2811Demo.h
Generated on Tue Jun 16 2026 00:06:58 for FastLED by
1.13.2