FastLED 3.6.0
Loading...
Searching...
No Matches
OctoWS2811Demo.ino
#define USE_OCTOWS2811
#include <OctoWS2811.h>
#include <FastLED.h>
#define NUM_LEDS_PER_STRIP 64
#define NUM_STRIPS 8
CRGB leds[NUM_STRIPS * NUM_LEDS_PER_STRIP];
// Pin layouts on the teensy 3:
// OctoWS2811: 2,14,7,8,6,20,21,5
void setup() {
FastLED.addLeds<OCTOWS2811>(leds, NUM_LEDS_PER_STRIP);
}
void loop() {
static uint8_t hue = 0;
for(int i = 0; i < NUM_STRIPS; i++) {
for(int j = 0; j < NUM_LEDS_PER_STRIP; j++) {
leds[(i*NUM_LEDS_PER_STRIP) + j] = CHSV((32*i) + hue+j,192,255);
}
}
// Set the first n leds on each strip to show which strip it is
for(int i = 0; i < NUM_STRIPS; i++) {
for(int j = 0; j <= i; j++) {
leds[(i*NUM_LEDS_PER_STRIP) + j] = CRGB::Red;
}
}
hue++;
}
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:17
central include file for FastLED, defines the CFastLED class/object
void delay(unsigned long ms)
Delay for the given number of milliseconds.
Definition FastLED.cpp:132
void setBrightness(uint8_t scale)
Set the global brightness scaling.
Definition FastLED.h:553
void show(uint8_t scale)
Update all our controllers with the current led colors, using the passed in brightness.
Definition FastLED.cpp:54
static CLEDController & addLeds(CLEDController *pLed, struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a CLEDController instance to the world.
Definition FastLED.cpp:42
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition pixeltypes.h:27
Representation of an RGB pixel (Red, Green, Blue)
Definition pixeltypes.h:120