Guest User

Untitled

a guest
Mar 3rd, 2016
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // this does compile!
  2. #include "FastLED.h"
  3. FASTLED_USING_NAMESPACE
  4.  
  5. #if defined(FASTLED_VERSION) && (FASTLED_VERSION < 3001000)
  6. #warning "Requires FastLED 3.1 or later; check github for latest code."
  7. #endif
  8.  
  9.  
  10. #define DATA_PIN_L    14      
  11. #define CLK_PIN_L     12      
  12. #define DATA_PIN_R    13      
  13. #define CLK_PIN_R     15      
  14.                            
  15.  
  16. #define LED_TYPE    APA102
  17. #define COLOR_ORDER BGR
  18. #define LED_COUNT       340
  19. #define LED_COUNT_LEFT  170
  20. #define LED_COUNT_RIGHT 170
  21. CRGB leds[LED_COUNT];
  22. //CRGB LEFT[LED_COUNT_LEFT];
  23. //CRGB RIGHT[LED_COUNT_RIGHT];
  24.  
  25. #define BRIGHTNESS       128
  26. CLEDController *LEFT;
  27. CLEDController *RIGHT;
  28. void setup() {
  29.  
  30.   delay(1000);
  31.   LEFT  =  &FastLED.addLeds<LED_TYPE,DATA_PIN_L,CLK_PIN_L,COLOR_ORDER>(leds, LED_COUNT_LEFT).setCorrection(DirectSunlight);
  32.   RIGHT =  &FastLED.addLeds<LED_TYPE,DATA_PIN_R,CLK_PIN_R,COLOR_ORDER>(leds, LED_COUNT_RIGHT).setCorrection(DirectSunlight);
  33.  
  34.   FastLED.setBrightness(BRIGHTNESS);
  35.  
  36. }
  37.  
  38. void loop () {
  39.  LEFT->showLeds(255);
  40.  RIGHT->showLeds(128);
  41.   }
Advertisement
Add Comment
Please, Sign In to add comment