When the board loses power, the "initial values" are re-read and applied to the current global variables. A better solution would be to periodically store globals in SPIFFS so that upon a power cycle of the board, the latest values get re-saved as the initial global variables.
When the board loses power, the "initial values" are re-read and applied to the current global variables. A better solution would be to periodically store globals in SPIFFS so that upon a power cycle of the board, the latest values get re-saved as the initial global variables.