Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <FastLED.h>
- const uint8_t Strip0Dat = 29,
- Strip0Clk = 30;
- const uint8_t Strip1Dat = 31,
- Strip1Clk = 32;
- const int NumStrips = 2;
- const int MaxLEDS = 172;
- const int TotalLEDS[NumStrips] = {172, 172};
- CRGB leds[NumStrips][MaxLEDS];
- void setup() {
- FastLED.setBrightness(0);
- FastLED.addLeds<APA102, Strip0Dat, Strip0Clk, BGR, DATA_RATE_MHZ(4)>(leds[0], TotalLEDS[0]);
- FastLED.addLeds<APA102, Strip1Dat, Strip1Clk, BGR, DATA_RATE_MHZ(4)>(leds[1], TotalLEDS[1]);
- FastLED.show();
- FastLED.setBrightness(255);
- fill_solid(leds[0], TotalLEDS[0], CHSV(0,0,140));
- fill_solid(leds[1], TotalLEDS[1], CHSV(0,0,140));
- }
- void loop() {
- static uint8_t Brightness = 100;
- Brightness++;
- fill_solid(leds[0], TotalLEDS[0], CHSV(0,0,Brightness));
- fill_solid(leds[1], TotalLEDS[1], CHSV(0,0,Brightness));
- FastLED.show();
- }
Advertisement
Add Comment
Please, Sign In to add comment