Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // **********************************
- // **** THIS IS NOT WORKING YET ****
- // **********************************
- //
- //
- //
- // This sketch is specifically for my exterior LED lights on my house
- // I started with MirroringSample - see https://github.com/FastLED/FastLED/wiki/Multiple-Controller-Examples
- // I have 4 strings of LEDs that will, for the most part, mirror each other
- // **********************
- // * *
- // * INITIAL PARAMETERS *
- // * *
- // **********************
- #include "FastLED.h"
- #define NUM_LEDS_PER_STRIP 100 // I am using the longest strip for the amount of LEDS since
- // I want all strips to start at the same time every time
- CRGB leds[NUM_LEDS_PER_STRIP];
- // **********************
- // * *
- // * VOID SETUP *
- // * *
- // **********************
- void setup() {
- // ***** SETTING UP THE MIRRORING *****
- // For mirroring strips, all the "special" stuff happens just in setup.
- // Need to addLeds multiple times, once for each strip
- FastLED.addLeds<WS2812B, 8, GRB>(leds, NUM_LEDS_PER_STRIP); // ********** I added the RGB ***********
- // above says there # LEDS in the strip as per INITIAL PARAMETERS **** noting in case it causes problems *******
- // The 8 is the data pin I want for this strip
- FastLED.addLeds<WS2812B, 9, GRB>(leds, NUM_LEDS_PER_STRIP);
- // above says there # LEDS in the strip as per INITIAL PARAMETERS
- // The 9 is the data pin I want for this strip
- FastLED.addLeds<WS2812B, 10, GRB>(leds, NUM_LEDS_PER_STRIP);
- // above says there # LEDS in the strip as per INITIAL PARAMETERS
- // The 10 is the data pin I want for this strip
- FastLED.addLeds<WS2812B, 11, GRB>(leds, NUM_LEDS_PER_STRIP);
- // above says there # LEDS in the strip as per INITIAL PARAMETERS
- // The 11 is the data pin I want for this strip
- // ***** SETTING THE DEFAULT BRIGHTNESS *****
- FastLED.setBrightness(63); // about one-quarter brightness
- // ***** ADDING A DELAY BEFORE THINGS START *****
- delay(5000); // 1000 = 1 second
- //
- } // ***** THE END OF VOID SETUP *****
- //
- //
- // * VOID LOOP *
- //
- //
- void loop()
- {
- //
- // ***** FILLING THE STRIPS WITH RED *****
- //
- for(int i = 0; i < NUM_LEDS_PER_STRIP; i++)
- {
- //
- leds[i] = CHSV( 0, 255, 255);
- leds[i-1] = CHSV(0,255,200);
- leds[i-2] = CHSV(0,255,175);
- leds[i-3] = CHSV(0,255,125);
- leds[i-4] = CHSV(0,255,75);
- leds[i-5] = CHSV(0,255,25);
- leds[i-6] = CHSV(0,255,10);
- leds[i-7] = CHSV(0,255,10);
- leds[i-8] = CHSV(0,255,10);
- //
- delay(3); // Determines speed of comet
- //
- FastLED.show(); // tells FastLED to display what you've asked for above
- //
- }
- //
- //
- } // This designates the end of the void loop so the program
- // will now go to the start of loop again.
Advertisement
Add Comment
Please, Sign In to add comment