SHARE
TWEET

set tower to any colour - FASTLED

a guest May 13th, 2015 162 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "FastLED.h"
  2.  
  3. #define NUM_LEDS 7
  4. #define DATA_PIN 9
  5. int i = 0;
  6. CRGB leds[NUM_LEDS];
  7.  
  8. void setup() {
  9.         // sanity check delay - allows reprogramming if accidently blowing power w/leds
  10.         delay(2000);
  11.  
  12.       // Uncomment one of the following lines for your leds arrangement.
  13.       // FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS);
  14.       // FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS);
  15.       // FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS);
  16.        FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
  17.       // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
  18.       // FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
  19.       // FastLED.setBrightness(CRGB(255,255,255));
  20.       // FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS);
  21.       // FastLED.addLeds<GW6205_400, DATA_PIN, RGB>(leds, NUM_LEDS);
  22.       // FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
  23.       // FastLED.addLeds<UCS1903B, DATA_PIN, RGB>(leds, NUM_LEDS);
  24.  
  25.       // FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
  26.       // FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS);
  27.       //FastLED.addLeds<LPD8806, 9, 10, RGB>(leds, NUM_LEDS);
  28.  
  29.       // FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
  30.       // FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
  31.       // FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
  32.      
  33.       //Set the tower to the colour
  34.      
  35.    
  36.       for(i = 0; i<NUM_LEDS; i++)
  37.       {
  38.       leds[i].setRGB( 0, 153, 153); //change these RGB values to make the whole tower glow that colour!
  39.       FastLED.show();
  40.       }
  41.      
  42. }
  43. void loop(){
  44.   //nothing here!
  45. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top