SHOW:
|
|
- or go back to the newest paste.
| 1 | - | // this does not compile |
| 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 | - | CLEDController LEFT = FastLED.addLeds<LED_TYPE,DATA_PIN_L,CLK_PIN_L,COLOR_ORDER>(leds, LED_COUNT_LEFT).setCorrection(DirectSunlight); |
| 30 | + | |
| 31 | - | CLEDController RIGHT = FastLED.addLeds<LED_TYPE,DATA_PIN_R,CLK_PIN_R,COLOR_ORDER>(LED_COUNT_RIGHT, LED_COUNT).setCorrection(DirectSunlight); |
| 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 | - | //CLEDController strip = FastLED.addLeds<WS2812, GRB, 8>(leds, NUM_LEDS); |
| 33 | + | |
| 34 | - | //CLEDController sign = FastLED.addLeds<WS2812, GRB, 9>(led_sign, NUM_LED_SIGN); |
| 34 | + | |
| 35 | ||
| 36 | } | |
| 37 | ||
| 38 | void loop () {
| |
| 39 | LEFT->showLeds(255); | |
| 40 | RIGHT->showLeds(128); | |
| 41 | - | LEFT.showLEDs(255); |
| 41 | + |