marmil

Testing_Gradient_2

Apr 12th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. //testing fill_gradient_2
  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.   for (int i=0; i<NUM_LEDS; i++){
  21.     leds[i] = CHSV(0,255,255);
  22.   }
  23.   FastLED.show();
  24.   delay(4000);
  25.  
  26.   fill_gradient(leds, 0, CHSV(0,255,255), NUM_LEDS, CHSV(2,255,255));
  27.   //fill_gradient_RGB(leds, 0, CRGB(255,0,0), NUM_LEDS, CRGB(253,0,0));
  28.   FastLED.show();
  29.   delay(2000);
  30.  
  31.   FastLED.clear();
  32.   FastLED.show();
  33.   delay(2000);
  34. }
Advertisement
Add Comment
Please, Sign In to add comment