Advertisement
GyroGearloose

strips with individual brightness problem

Mar 3rd, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.20 KB | None | 0 0
  1. // this does not 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.  
  27. void setup() {
  28.  
  29.   delay(1000);
  30. CLEDController LEFT  =  FastLED.addLeds<LED_TYPE,DATA_PIN_L,CLK_PIN_L,COLOR_ORDER>(leds, LED_COUNT_LEFT).setCorrection(DirectSunlight);
  31. CLEDController RIGHT =  FastLED.addLeds<LED_TYPE,DATA_PIN_R,CLK_PIN_R,COLOR_ORDER>(LED_COUNT_RIGHT, LED_COUNT).setCorrection(DirectSunlight);
  32.  
  33. //CLEDController strip = FastLED.addLeds<WS2812, GRB, 8>(leds, NUM_LEDS);
  34. //CLEDController sign = FastLED.addLeds<WS2812, GRB, 9>(led_sign, NUM_LED_SIGN);
  35.  
  36.   FastLED.setBrightness(BRIGHTNESS);
  37.  
  38. }
  39.  
  40. void loop () {
  41.  LEFT.showLEDs(255);
  42.  RIGHT.showLEDs(128);
  43.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement