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