marmil

Testing_Gradient

Apr 12th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.81 KB | None | 0 0
  1. //testing fill_gradient
  2.  
  3. #include "FastLED.h"
  4. #define DATA_PIN 11
  5. #define CLOCK_PIN 13
  6. #define LED_TYPE LPD8806
  7. #define COLOR_ORDER GRB
  8. #define NUM_LEDS 32
  9. CRGB leds[NUM_LEDS];
  10.  
  11. void setup() {
  12.   delay(3000);
  13.   FastLED.addLeds<LED_TYPE,DATA_PIN,CLOCK_PIN,COLOR_ORDER>(leds, NUM_LEDS);
  14.  
  15.   FastLED.setBrightness(15);  // <---***NOTE, setting this very low***
  16. }
  17.  
  18.  
  19. void loop(){
  20.   fill_solid(leds, NUM_LEDS, CHSV(0,255,255));
  21.   FastLED.show();
  22.   delay(5000);
  23.  
  24.   fill_solid(leds, NUM_LEDS, CHSV(0,0,0));
  25.   FastLED.show();
  26.   delay(30);
  27.  
  28.   fill_gradient(leds, 0, CHSV(0,255,255), NUM_LEDS, CHSV(2,255,255));
  29.   //fill_gradient_RGB(leds, 0, CRGB(255,0,0), NUM_LEDS, CRGB(253,0,0));
  30.   FastLED.show();
  31.   delay(2000);
  32.  
  33.   fill_solid(leds, NUM_LEDS, CHSV(0,0,0));
  34.   FastLED.show();
  35.   delay(4000);
  36. }
Advertisement
Add Comment
Please, Sign In to add comment