C++:
//////////// Настройка символов
uint8_t clockHue;
const uint8_t HUE_GAP = 32;
void Digit(uint8_t digit, uint8_t cursor) {
for (uint8_t mask = 0b01000000; mask > 0; mask = mask >> 1) {
for (uint8_t i = 0; i < LEDS_IN_SEGMENT; i++) {
if (c.new_god) {
leds[cursor] = (digit & mask) ? ColorTable[rand() % NUM_COLORS - 1] : CRGB(0, 0, 0);
} else {
uint8_t color_idx = 1;
if (color_idx == 1) {
for (uint8_t i = 0; i < 5; i++) leds[cursor + i] = CHSV(clockHue + HUE_GAP * i, 255, 255);
leds[cursor + 2] = CHSV(clockHue + 128 + HUE_GAP * 1, 255, 255);
} else if (color_idx == 2) {
CRGB clockLED[5];
clockLED[0] = CHSV(clockHue + HUE_GAP * 0, 255, 255);
clockLED[1] = CHSV(clockHue + HUE_GAP * 0, 255, 255);
clockLED[2] = CHSV(clockHue + 128 + HUE_GAP * 1, 255, 255);
clockLED[3] = CHSV(clockHue + HUE_GAP * 2, 255, 255);
clockLED[4] = CHSV(clockHue + HUE_GAP * 2, 255, 255);
for (uint8_t i = 0; i < 5; i++) leds[cursor + i] = clockLED[i];
}
}
cursor++;
}
}
}



