Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "FastLED.h"
- //
- #define DATA_PIN 8
- //
- //#define CLK_PIN 4
- //
- #define NUM_LEDS 100
- //
- CRGB leds[NUM_LEDS];
- // the above creates an LED array to hold
- // the values for each led in your strip
- // Whatever THAT means :)
- //
- // ****************
- // ****************
- // ** VOID SETUP **
- // ****************
- // ****************
- //
- void setup()
- // void setup gets everything ready for what will run in the void loop.
- {
- //
- delay(3000); // 3 second delay for recovery
- //
- FastLED.setBrightness(96);
- //
- FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
- //
- // FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
- // The above is another common type of strip
- // You would comment the WS2812B and uncomment the Neopixel to use it.
- //
- }
- //
- // ***************
- // ***************
- // ** VOID LOOP **
- // ***************
- // ***************
- //
- void loop()
- //
- {
- //
- for (int j=0; j<10; j++) //do 10 cycles of chasing ????? what does this do
- {
- for (int q=0; q < 3; q++)
- {
- for (int i=0; i < NUM_LEDS; i=i+3)
- {
- leds[i+q] = CHSV(0,255,255); //turn every third pixel on
- }
- FastLED.show();
- //
- delay(300);
- //
- for (int i=0; i < NUM_LEDS; i=i+3)
- {
- leds[i+q] = CHSV(0,255,0); //turn every third pixel off
- // setPixel(i+q, 0,0,0);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment