Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // *************************************
- // *************************************
- // **** UNTESTED ****
- // *************************************
- // *************************************
- //
- #include "FastLED.h"
- //
- #define DATA_PIN 8
- //
- //#define CLK_PIN 4
- //
- #define NUM_LEDS 5
- //
- 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);
- // Commented the above because I'm only working with a couple
- // of LEDs at a time -- no chance of burning out my
- // Arduino.
- //
- 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 i = 0; i < NUM_LEDS; i++) {
- // The above starts at the first LED, 0, and then counts up one every time it loops
- // as long as it's less than the total number of LEDs set in the initial parameters.
- leds[i] = CHSV( 0, 255, 0);
- // The above sets the current LED to red but at "zero" brightness, or off, using Hue Saturation Value
- //
- leds[0].maximizeBrightness(25);
- // HOPING the above fades up the first LED
- // in increments of 25
- //
- // ???????????????????????????
- // ???????????????????????????
- // ???????????????????????????
- // Should the show function be before or after the } BELOW
- //
- FastLED.show(); // tells FastLED to display what you've asked for above
- //
- // ???????????????????????????
- // ???????????????????????????
- // ???????????????????????????
- // Should the delay function be before or after the } BELOW
- delay(5000);
- //
- //
- }// *********** THIS } ************
- //
- //
- // ???????????????????????????
- // ???????????????????????????
- // ???????????????????????????
- // Should the show function be before or after the } ABOVE
- // FastLED.show(); // tells FastLED to display what you've asked for above
- //
- // ???????????????????????????
- // ???????????????????????????
- // ???????????????????????????
- // Should the delay function be before or after the } ABOVE
- // delay(5000);
- }
- //
Advertisement
Add Comment
Please, Sign In to add comment