diff options
author | Daniel Garcia <danielgarcia@gmail.com> | 2014-05-31 05:09:10 +0400 |
---|---|---|
committer | Daniel Garcia <danielgarcia@gmail.com> | 2014-05-31 05:09:10 +0400 |
commit | 7947112768eff495cafa5bcce92a29746257dd24 (patch) | |
tree | 1702bc5eda0907ad134809967a834203e71121e4 /examples/Fast2Dev/Fast2Dev.ino | |
parent | ba4583424a5d4c18e43913bcf7911340226673be (diff) |
Getting rid of a bad example
Diffstat (limited to 'examples/Fast2Dev/Fast2Dev.ino')
-rw-r--r-- | examples/Fast2Dev/Fast2Dev.ino | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/examples/Fast2Dev/Fast2Dev.ino b/examples/Fast2Dev/Fast2Dev.ino deleted file mode 100644 index 3ae799c0..00000000 --- a/examples/Fast2Dev/Fast2Dev.ino +++ /dev/null @@ -1,108 +0,0 @@ -// Uncomment this line if you have any interrupts that are changing pins - this causes the library to be a little bit more cautious -// #define FAST_SPI_INTERRUPTS_WRITE_PINS 1 - -// Uncomment this line to force always using software, instead of hardware, SPI (why?) -// #define FORCE_SOFTWARE_SPI 1 - -// Uncomment this line if you want to talk to DMX controllers -// #define FASTSPI_USE_DMX_SIMPLE 1 - -#include "FastLED.h" - - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// -// test code -// -////////////////////////////////////////////////// - -#define NUM_LEDS 256 - -CRGB leds[NUM_LEDS]; - -void setup() { - // sanity check delay - allows reprogramming if accidently blowing power w/leds - delay(2000); - - // For safety (to prevent too high of a power draw), the test case defaults to - // setting brightness to 25% brightness - LEDS.setBrightness(64); - - // LEDS.addLeds<WS2811, 13, BRG>(leds, NUM_LEDS); - // LEDS.addLeds<TM1809, 13, BRG>(leds, NUM_LEDS); - // LEDS.addLeds<UCS1903, 13>(leds, NUM_LEDS); - // LEDS.addLeds<TM1803, 13>(leds, NUM_LEDS); - // LEDS.addLeds<TM1829, 13>(leds, NUM_LEDS); - - FastLED.addLeds<UCS1903B, 13, RGB>(leds, NUM_LEDS); - - // LEDS.addLeds<P9813>(leds, NUM_LEDS); - // LEDS.addLeds<LPD8806>(leds, NUM_LEDS); - // LEDS.addLeds<P9813>(leds, NUM_LEDS); - - // LEDS.addLeds<LPD8806>(leds, NUM_LEDS); - // LEDS.addLeds<WS2801>(leds, NUM_LEDS); - // LEDS.addLeds<SM16716>(leds, NUM_LEDS); - - // LEDS.addLeds<WS2811, 11>(leds, NUM_LEDS); - - // Put ws2801 strip on the hardware SPI pins with a BGR ordering of rgb and limited to a 1Mhz data rate - // LEDS.addLeds<WS2801, 11, 13, BGR, DATA_RATE_MHZ(1)>(leds, NUM_LEDS); - - // LEDS.addLeds<LPD8806, 10, 11>(leds, NUM_LEDS); - // LEDS.addLeds<WS2811, 13, BRG>(leds, NUM_LEDS); - // LEDS.addLeds<LPD8806, BGR>(leds, NUM_LEDS); -} - -void loop() { - // LEDS.clear(); for(;;); - - for(int i = 0; i < 3; i++) { - for(int iLed = 0; iLed < NUM_LEDS; iLed++) { - memset(leds, 0, NUM_LEDS * sizeof(struct CRGB)); - - switch(i) { - // You can access the rgb values by field r, g, b - case 0: leds[iLed].r = 128; break; - - // or by indexing into the led (r==0, g==1, b==2) - case 1: leds[iLed][i] = 128; break; - - // or by setting the rgb values for the pixel all at once - case 2: leds[iLed] = CRGB(0, 0, 128); break; - } - - // and now, show your led array! - LEDS.show(); - delay(10); - } - - // leave the last pixel lit for a bit - delay(2000); - - // fade up - for(int x = 0; x < 128; x++) { - // The showColor method sets all the leds in the strip to the same color - LEDS.showColor(CRGB(x, 0, 0)); - delay(10); - } - - // fade down - for(int x = 128; x >= 0; x--) { - LEDS.showColor(CRGB(x, 0, 0)); - delay(10); - } - - // let's fade up by scaling the brightness - for(int scale = 0; scale < 128; scale++) { - LEDS.showColor(CRGB(0, 128, 0), scale); - delay(10); - } - - // let's fade down by scaling the brightness - for(int scale = 128; scale > 0; scale--) { - LEDS.showColor(CRGB(0, 128, 0), scale); - delay(10); - } - } -} |