FastLED 3.9.15
Loading...
Searching...
No Matches
ParallelOutputDemo.h
Go to the documentation of this file.
1
2
6
7#include <FastLED.h>
8
9#define NUM_LEDS_PER_STRIP 16
10// Note: this can be 12 if you're using a teensy 3 and don't mind soldering the pads on the back
11#define NUM_STRIPS 16
12
14
15// Pin layouts on the teensy 3/3.1:
16// WS2811_PORTD: 2,14,7,8,6,20,21,5
17// WS2811_PORTC: 15,22,23,9,10,13,11,12,28,27,29,30 (these last 4 are pads on the bottom of the teensy)
18// WS2811_PORTDC: 2,14,7,8,6,20,21,5,15,22,23,9,10,13,11,12 - 16 way parallel
19//
20// Pin layouts on the due
21// WS2811_PORTA: 69,68,61,60,59,100,58,31 (note: pin 100 only available on the digix)
22// WS2811_PORTB: 90,91,92,93,94,95,96,97 (note: only available on the digix)
23// WS2811_PORTD: 25,26,27,28,14,15,29,11
24//
25
26
27// IBCC<WS2811, 1, 16> outputs;
28
29void setup() {
30 delay(5000);
31 Serial.begin(57600);
32 Serial.println("Starting...");
33 // FastLED.addLeds<WS2811_PORTA,NUM_STRIPS>(leds, NUM_LEDS_PER_STRIP);
34 // FastLED.addLeds<WS2811_PORTB,NUM_STRIPS>(leds, NUM_LEDS_PER_STRIP);
35 // FastLED.addLeds<WS2811_PORTD,NUM_STRIPS>(leds, NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);
36 FastLED.addLeds<WS2811_PORTDC,NUM_STRIPS>(leds, NUM_LEDS_PER_STRIP);
37
38 // Teensy 4 parallel output example
39 // FastLED.addLeds<NUM_STRIPS, WS2811, 1>(leds,NUM_LEDS_PER_STRIP);
40}
41
42void loop() {
43 Serial.println("Loop....");
44 static uint8_t hue = 0;
45 for(int i = 0; i < NUM_STRIPS; i++) {
46 for(int j = 0; j < NUM_LEDS_PER_STRIP; j++) {
47 leds[(i*NUM_LEDS_PER_STRIP) + j] = CHSV((32*i) + hue+j,192,255);
48 }
49 }
50
51 // Set the first n leds on each strip to show which strip it is
52 for(int i = 0; i < NUM_STRIPS; i++) {
53 for(int j = 0; j <= i; j++) {
55 }
56 }
57
58 hue++;
59
60 FastLED.show();
61 // FastLED.delay(100);
62}
CRGB leds[NUM_LEDS]
uint8_t hue
#define NUM_LEDS_PER_STRIP
Definition ColorBoost.h:51
#define NUM_STRIPS
Definition ColorBoost.h:52
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:74
central include file for FastLED, defines the CFastLED class/object
void setup()
void loop()
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
Definition crgb.h:679
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition hsv.h:15