#include <FastLED.h>
#define LED_PIN 2
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
#define NUM_LEDS 34 + 25 + 34 + 25
CRGB leds3[NUM_LEDS];
CRGB leds2[NUM_LEDS];
uint16_t num_leds3 = NUM_LEDS;
void setup() {
FastLED.addLeds<LED_TYPE,LED_PIN,COLOR_ORDER>(leds3, NUM_LEDS);
}
void LedPercent(uint16_t value)
{
static uint8_t starthue = 0;
fill_solid( leds3, num_leds3, CRGB(0,0,0));
uint8_t MAX_PEAK = 25;
uint16_t peak = (value * MAX_PEAK) / 100;
//printf("\n LedPercent value=%d peak=%d", value, peak);
fill_rainbow( &leds3[34], peak, starthue, 20);
fill_rainbow( &leds3[34+25+34+(25-peak)], peak, starthue, 20);
//fadeInOutThree(leds3, 34);
//fadeInOutThree(&leds3[34+25], 34);
starthue+=5;
}
int LiczbaLedBoki = 0;
#define leds2 leds3
void circleLedStr2(void) {
printf("\n circleLedStr2 LiczbaLedBoki=%d ", LiczbaLedBoki);
if(LiczbaLedBoki==0) {
static int cnt = 0;
static int cntBramka = 12;
CRGB colourArray[] = {CRGB::Blue, CRGB::Red, CRGB::Green};
//if ((cnt-1) >= 0) leds2[cnt-1] = CRGB::Black;
//if ((cntBramka-1) >= 12) leds2[cntBramka-1] = CRGB::Black;
static int colourCnt = 0;
colourCnt++;
if (cnt < (12-1)) cnt++;
else {
//leds2[cnt] = CRGB::Black;
for(int i = 0; i<12;i++) leds2[i] = CRGB::Black;
cnt = 0;
}
if (cntBramka < (12+16-1)) cntBramka++;
else {
//leds2[cntBramka] = CRGB::Black;
for(int i = 12; i <(12 + 16);i++) leds2[i] = CRGB::Black;
cntBramka = 12;
}
leds2[cnt] = colourArray[colourCnt%3];
leds2[cntBramka] = colourArray[colourCnt%3];
}
}
void loop() {
// for each strip
// for (uint8_t i = 0; i < 100; i++) {
// leds[i] = CRGB::Red;
// delay(100);
// FastLED.show();
// }
static int i = 0;
circleLedStr2();
FastLED.show();
if(i<100) i++;
else i=0;
delay(100);
}