Add LED blink on save
This commit is contained in:
parent
67a5277d2a
commit
514389796c
@ -300,6 +300,8 @@ void setup() {
|
|||||||
pinMode(PIN_BTN_M, INPUT);
|
pinMode(PIN_BTN_M, INPUT);
|
||||||
pinMode(PIN_BTN_R, INPUT);
|
pinMode(PIN_BTN_R, INPUT);
|
||||||
pinMode(PIN_BUZZER, OUTPUT);
|
pinMode(PIN_BUZZER, OUTPUT);
|
||||||
|
pinMode(LED_BUILTIN, OUTPUT);
|
||||||
|
digitalWrite(LED_BUILTIN, HIGH);
|
||||||
|
|
||||||
display.setI2CAddress(DISPLAY_I2C_ADDRESS * 2); // required if display does not use default address of 0x3C
|
display.setI2CAddress(DISPLAY_I2C_ADDRESS * 2); // required if display does not use default address of 0x3C
|
||||||
display.begin(); // initialize U8g2 graphics library for selected display module
|
display.begin(); // initialize U8g2 graphics library for selected display module
|
||||||
@ -340,8 +342,10 @@ void loop() {
|
|||||||
|
|
||||||
#ifdef AUTO_SAVE_MINUTES
|
#ifdef AUTO_SAVE_MINUTES
|
||||||
if ((currentMillis - lastSaveTimestamp) > AUTO_SAVE_INTERVAL) {
|
if ((currentMillis - lastSaveTimestamp) > AUTO_SAVE_INTERVAL) {
|
||||||
|
digitalWrite(LED_BUILTIN, LOW);
|
||||||
lastSaveTimestamp = currentMillis;
|
lastSaveTimestamp = currentMillis;
|
||||||
saveStateToEEPROM(&cpuState);
|
saveStateToEEPROM(&cpuState);
|
||||||
|
digitalWrite(LED_BUILTIN, HIGH);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user