Are global variables permanent?

Ok, not really permanent, but are global variables stored in a way in the device itself so that they aren’t lost in a reboot/power cycle?

image

I read all of that yesterday, but I still don’t know if global variables are stored in flash to survive reboots. That’s all I need to know.

Nowhere does it say anything about global variables being stored in flash memory, hence my question.

Maybe I’m being thick, but the restore_state and esp8266_restore_from_flash combination from my screenshot looks like it does what you want? It literally tells you that it stores in RTC memory, and gives you the option to save to flash…?

1 Like