int i = 0;
for (i = 0; i < LEDCOUNT; i++)
strip.setPixelColor(i, R, G, B); //заливаем контур (60 светодиодов)
for (i = FIRSTLEDID%5; i < FIRSTLEDID%5+LEDCOUNT; i = i+5)
strip.setPixelColor(i, 0, G + PLUS, B); // заливаем зеленые разделители
hoursDelta = m/12;
int currentHourLed;
currentHourLed = FIRSTLEDID + h*5; //для всех остальных часов
int LedH1 = (currentHourLed - 1)% LEDCOUNT + hoursDelta;
int LedH2 = (currentHourLed)% LEDCOUNT + hoursDelta;
int LedH3 = (currentHourLed + 1)% LEDCOUNT + hoursDelta;
if (LedH1 > 59){
strip.setPixelColor(LedH1 - 60, 250, 0, 0);
strip.setPixelColor(LedH2, 250, 0, 0);
strip.setPixelColor(LedH3, 250 ,0 ,0);
}
if (LedH3 > 59){
strip.setPixelColor(LedH1, 250, 0, 0);
strip.setPixelColor(LedH2, 250, 0, 0);
strip.setPixelColor(LedH3 - 60, 250 ,0 ,0);
}
else{
strip.setPixelColor(LedH1, 250, 0, 0);
strip.setPixelColor(LedH2, 250, 0, 0);
strip.setPixelColor(LedH3, 250 ,0 ,0);
}
strip.setPixelColor((FIRSTLEDID+m) % LEDCOUNT, 250, 0, 250); //Рисуем "минуту"
strip.show();