Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "FastLED.h"
- #define NUM_LEDS 100
- #define DATA_PIN 6
- CRGB leds[NUM_LEDS];
- void setup() {
- // sanity check delay - allows reprogramming if accidently blowing power w/leds
- delay(2000);
- FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
- }
- /* for(int Row1 = 0; Row1 < 10; Row1++)
- for(int Row2 = 10; Row2 < 20; Row2++)
- for(int Row3 = 20; Row3 < 30; Row3++)
- for(int Row4 = 30; Row4 < 40; Row4++)
- for(int Row5 = 40; Row5 < 50; Row5++)
- for(int Row6 = 50; Row6 < 60; Row6++)
- for(int Row7 = 60; Row7 < 70; Row7++)
- for(int Row8 = 70; Row8 < 80; Row8++)
- for(int Row9 = 80; Row9 < 90; Row9++)
- for(int Row10 = 90; Row10 < 100; Row10++)
- */
- // add loop
- void loop() {
- for(int Row1 = 0; Row1 < 10; Row1++) {
- leds[Row1] = CHSV( 0, 255, 255);
- FastLED.show();
- }
- delay(1000);
- for(int Row2 = 10; Row2 < 20; Row2++) {
- leds[Row2] = CHSV( 32, 255, 255);
- FastLED.show();
- }
- delay(1000);
- for(int Row3 = 20; Row3 < 30; Row3++) {
- leds[Row3] = CHSV( 64, 255, 255);
- FastLED.show();
- }
- delay(1000);
- for(int Row4 = 30; Row4 < 40; Row4++) {
- leds[Row4] = CHSV( 96, 255, 255);
- FastLED.show();
- }
- delay(1000);
- for(int Row5 = 40; Row5 < 50; Row5++) {
- leds[Row5] = CHSV( 128, 255, 255);
- FastLED.show();
- }
- delay(1000);
- for(int Row6 = 50; Row6 < 60; Row6++) {
- leds[Row6] = CHSV( 160, 255, 255);
- FastLED.show();
- }
- delay(1000);
- for(int Row7 = 60; Row7 < 70; Row7++) {
- leds[Row7] = CHSV( 192, 255, 255);
- FastLED.show();
- }
- delay(1000);
- for(int Row8 = 70; Row8 < 80; Row8++) {
- leds[Row8] = CHSV( 224, 255, 255);
- FastLED.show();
- }
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment