diff options
author | danielgarcia@gmail.com <danielgarcia@gmail.com@4ad4ec5c-605d-bd5c-5796-512c9b60011b> | 2013-10-21 21:33:23 +0400 |
---|---|---|
committer | danielgarcia@gmail.com <danielgarcia@gmail.com@4ad4ec5c-605d-bd5c-5796-512c9b60011b> | 2013-10-21 21:33:23 +0400 |
commit | 93992ee82937f9517c9c9a68e2315a7ed8f36449 (patch) | |
tree | cbff0b94abb95b949b6c0bc12fd43d89596b80c7 /examples/FirstLight | |
parent | d04406a922c2af9a568f2c0bfba6897516cec8e3 (diff) |
Add WS2811_400 for 400khz ws2811 chips
Diffstat (limited to 'examples/FirstLight')
-rw-r--r-- | examples/FirstLight/FirstLight.ino | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/examples/FirstLight/FirstLight.ino b/examples/FirstLight/FirstLight.ino index 28258b52..0939fe8e 100644 --- a/examples/FirstLight/FirstLight.ino +++ b/examples/FirstLight/FirstLight.ino @@ -7,7 +7,12 @@ // // How many leds are in the strip? -#define NUM_LEDS 40 +#define SWITCH 2 +#if SWITCH == 1 +#define NUM_LEDS 18 * 3 +#elif SWITCH == 2 +#define NUM_LEDS 75 * 4 +#endif // Data pin that led data will be written out over #define DATA_PIN 6 @@ -27,7 +32,17 @@ void setup() { // FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS); - FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS); + #if SWITCH == 1 + FastSPI_LED2.addLeds<WS2811, 16, GRB>(leds, NUM_LEDS/3); + FastSPI_LED2.addLeds<WS2811, 7, GRB>(leds+18, NUM_LEDS/3); + FastSPI_LED2.addLeds<WS2811, 19, GRB>(leds+36, NUM_LEDS/3); + #elif SWITCH == 2 + FastSPI_LED2.addLeds<WS2811, 17, GRB>(leds, 75); + FastSPI_LED2.addLeds<WS2811, 18, GRB>(leds + 75, 75); + FastSPI_LED2.addLeds<WS2811, 7, GRB>(leds + 150, 75); + FastSPI_LED2.addLeds<WS2811, 8, GRB>(leds + 225, 75); + #endif + // FastLED.addLeds<WS2811, 8, RGB>(leds + 225, NUM_LEDS/4); // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS); |