/* * Update the pixels */ void updatePixels(int fsm_state, bool am) { long rn; // update Pixels // Serial.println("Update pixels"); pixels.setPixelColor(HOUR_LED, pixels.Color(100, 100, 0 )); pixels.setPixelColor(MIN_LED, pixels.Color(100, 100, 0 )); pixels.setPixelColor(SEC_LED, pixels.Color(100, 100, 0 )); if (am) pixels.setPixelColor(AM_LED, pixels.Color(100, 100, 0 )); else pixels.setPixelColor(AM_LED, pixels.Color(0, 0, 0)); if (fsm_state == RUN_STATE) { pixels.setPixelColor(PWR_LED, pixels.Color(0, 255, 0 )); } else { pixels.setPixelColor(PWR_LED, pixels.Color(0, 0, 255 )); } pixels.show(); // This sends the updated pixel color to the hardware. }