Save Data to ESP32 Flash Permanently using Preferences Library with examples : Save/Read Network Credentials, Remembering the Last GPIO state