Add startup sequence

This commit is contained in:
Leni Aniva 2025-06-11 15:30:28 -07:00
parent 675f4f995b
commit db4232f94d
Signed by: aniva
GPG Key ID: D5F96287843E8DFB
1 changed files with 10 additions and 1 deletions

View File

@ -68,6 +68,9 @@ void setup() {
#if USE_LED
// Main LED strip
FastLED.addLeds<LED_TYPE, pinLED, RGB>(leds, NUM_LEDS);
fill_solid(leds, NUM_LEDS, CRGB::White);
delay(500);
FastLED.show();
#endif
#if USE_DISPLAY
Serial.begin(9600);
@ -79,9 +82,11 @@ void setup() {
digitalWrite(pinLED, HIGH);
}
#endif
digitalWrite(LED_BUILTIN, HIGH);
}
void loop() {
// Detect a rising edge
int buttonState = digitalRead(pinButtonMode);
if (buttonState && !stateButtonMode) {
programId = (programId + 1) % MAX_PROGRAMS;
@ -108,8 +113,10 @@ void loop() {
if (programChanged) {
update_screen();
programChanged = false;
digitalWrite(LED_BUILTIN, LOW);
}
programChanged = false;
}
// Utility for updating LEDs
@ -169,6 +176,7 @@ void program_off()
FastLED.show();
#endif
}
delay(cycle_duration);
}
void program_still()
{
@ -181,6 +189,7 @@ void program_still()
FastLED.show();
#endif
}
delay(cycle_duration);
}
void program_rotate()
{