FastLED 3.9.15
Loading...
Searching...
No Matches

◆ setup()

void setup ( )

Definition at line 61 of file ParallelOutputDemo.h.

61 {
62 delay(5000);
63 Serial.begin(57600);
64 Serial.println("Starting...");
65#if defined(HAS_PORTDC)
66 // Teensy 3 parallel output example using port controller backend.
67 //
68 // fastLED.addLeds<WS2811_PORTDC, NUM_STRIPS>(...) invokes the compiler
69 // to select and specialize the CWS2811Controller<> template for the
70 // PORTDC pin configuration. The template is instantiated with knowledge
71 // of which pins belong to which ports, enabling direct hardware register
72 // access with precise timing for all 16 parallel LED outputs.
73 //
74 // Alternative port controller options (commented out):
75 // FastLED.addLeds<WS2811_PORTA,NUM_STRIPS>(leds, NUM_LEDS_PER_STRIP);
76 // FastLED.addLeds<WS2811_PORTB,NUM_STRIPS>(leds, NUM_LEDS_PER_STRIP);
77 // FastLED.addLeds<WS2811_PORTD,NUM_STRIPS>(leds, NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);
78 //
79 // Using PORTDC for 16-way parallel output (combined ports D and C):
80 FastLED.addLeds<WS2811_PORTDC,NUM_STRIPS>(leds, NUM_LEDS_PER_STRIP);
81#else
82 // NOTE: Parallel port output requires HAS_PORTDC support (Teensy 3.x only).
83 // Teensy 4.x does NOT support the WS2811_PORTDC style parallel output.
84 // For Teensy 4.x, use single-lane output on GPIO pins or consider
85 // alternative approaches for parallel LED control.
86 Serial.println("Parallel port output not supported on this platform");
87#endif
88}
fl::CRGB leds[NUM_LEDS]
#define NUM_LEDS_PER_STRIP
#define NUM_STRIPS
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
void delay(u32 ms, bool run_async=true) FL_NOEXCEPT
Public delay wrapper that keeps bare Arduino delay() preferred after using fl::delay; while still all...
Definition delay.h:98
#define Serial
Definition serial.h:304

References FastLED, leds, NUM_LEDS_PER_STRIP, NUM_STRIPS, and Serial.