Last active
February 16, 2016 23:04
-
-
Save focalintent/561051ff61023bea500c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FastLED.h> | |
#define LEDS_SIDE_LEN 29 | |
#define LEDS_SIDE_NUM 3 | |
#define NUM_LEDS_LEFT (LEDS_SIDE_LEN*LEDS_SIDE_NUM) | |
#define NUM_LEDS_RGHT (LEDS_SIDE_LEN*LEDS_SIDE_NUM) | |
#define NUM_LEDS_CNTR 96 | |
CRGB ledsLEFT[NUM_LEDS_LEFT]; | |
CRGB ledsCNTR[NUM_LEDS_CNTR]; | |
CRGB ledsRGHT[NUM_LEDS_RGHT]; | |
#define LED_PIN_LEFT 2 | |
#define LED_PIN_CNTR 3 | |
#define LED_PIN_RGHT 4 | |
uint8_t br[3]; | |
void setup() | |
{ | |
delay(3000); | |
LEDS.addLeds<WS2811, LED_PIN_LEFT, GRB>(ledsLEFT, NUM_LEDS_LEFT); | |
LEDS.addLeds<WS2811, LED_PIN_CNTR, GRB>(ledsCNTR, NUM_LEDS_CNTR); | |
LEDS.addLeds<WS2811, LED_PIN_RGHT, GRB>(ledsRGHT, NUM_LEDS_RGHT); | |
br[0] = 32; | |
br[1] = 128; | |
br[2] = 64; | |
// ledsLEFT ---> .setBrightness(32); | |
// ledsCNTR ---> .setBrightness(128); | |
// ledsRGHT ---> .setBrightness(64); | |
LEDS.show(); // push black | |
} | |
void loop() | |
{ | |
LEDS[0].setCorrection(CRGB(br[0],br[0],br[0])); | |
LEDS[1].setCorrection(CRGB(br[1],br[1],br[1])); | |
LEDS[2].setCorrection(CRGB(br[2],br[2],br[2])); | |
// do LED stuff... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment