Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "FastLED.h"
- #define NUM_LEDS_PER_STRIP 9
- CRGB leftWallLeds[NUM_LEDS_PER_STRIP];
- CRGB rightWallLeds[NUM_LEDS_PER_STRIP];
- CRGB bottomLeds[NUM_LEDS_PER_STRIP];
- CRGB tempLED;
- byte hue = 0;
- byte counter=0;
- int spark = 0;
- int sparkCheck = 0;
- void setup() {
- // put your setup code here, to run once:
- FastLED.addLeds<NEOPIXEL, D3>(leftWallLeds, NUM_LEDS_PER_STRIP);
- FastLED.addLeds<NEOPIXEL, D5>(rightWallLeds, NUM_LEDS_PER_STRIP);
- FastLED.addLeds<NEOPIXEL, D7>(bottomLeds, NUM_LEDS_PER_STRIP);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- hue++;
- delay(random(20,40));
- int i = random8(8);
- leftWallLeds[i] = CHSV(random(1,15), 255, random(30,160));
- rightWallLeds[i] = CHSV(random(15,25), 255, random(30,160));
- bottomLeds[i] = CHSV(random(250,8), 255, random(30,160));
- FastLED.show();
- delay(random(50,75));
- for(int x=0; x<NUM_LEDS_PER_STRIP; x++){
- leftWallLeds[x].fadeToBlackBy(.5);
- }
- for(int x=0; x<NUM_LEDS_PER_STRIP; x++){
- rightWallLeds[x].fadeToBlackBy(.5);
- }
- for(int x=0; x<NUM_LEDS_PER_STRIP; x++){
- bottomLeds[x].fadeToBlackBy(.5);
- }
- }
Add Comment
Please, Sign In to add comment