FastLED
3.10.6
Loading...
Searching...
No Matches
MultipleEsp32SpiBuses.ino
Go to the documentation of this file.
1
// @filter: (platform is esp32)
8
9
#include <FastLED.h>
10
11
// The @filter above keeps discovery-driven builds from picking this sketch up
12
// off ESP32 at all. The guard below is the belt to that suspenders: an explicit
13
// `uno all` compiles every sketch regardless of filter, and an ESP32-only
14
// sketch has to compile away to nothing there rather than `#error` out, or the
15
// build reports what looks like a toolchain problem rather than an example that
16
// was never meant for AVR.
17
#if defined(ESP32)
18
19
CRGB
spi2Leds[8];
20
CRGB
spi3Leds[8];
21
22
void
setup
() {
23
FastLED
.addLeds<
APA102
, 11, 12,
RGB
,
DATA_RATE_MHZ
(20)>(
24
spi2Leds, 8,
fl::Esp32SpiBus::HOST2
);
25
FastLED
.addLeds<
APA102
, 13, 14,
RGB
,
DATA_RATE_MHZ
(20)>(
26
spi3Leds, 8,
fl::Esp32SpiBus::HOST3
);
27
}
28
29
void
loop
() {
30
FastLED
.show();
31
}
32
33
#else
34
void
setup
() {}
35
void
loop
() {}
36
#endif
// defined(ESP32)
setup
void setup()
Definition
AnalogOutput.ino:58
loop
void loop()
Definition
AnalogOutput.ino:47
FastLED
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition
FastLED.cpp.hpp:90
RGB
constexpr EOrder RGB
Definition
eorder.h:17
APA102
@ APA102
APA102 LED chipset.
Definition
FastLED.h:304
DATA_RATE_MHZ
#define DATA_RATE_MHZ
Definition
fastspi.h:95
CRGB
fl::CRGB CRGB
Definition
crgb.h:25
fl::Esp32SpiBus::HOST3
@ HOST3
Definition
spi_bus.h:21
fl::Esp32SpiBus::HOST2
@ HOST2
Definition
spi_bus.h:20
examples
MultipleEsp32SpiBuses
MultipleEsp32SpiBuses.ino
Generated on Sun Oct 4 2026 23:08:59 for FastLED by
1.13.2