wayland/esp32-preferences@0.0.5

License: Apache-2.0

Save data (byte, number and string data types) to the non-volatile storage (NVS) of the ESP32. Wrapper for the ESP32 Preferences library (https://github.com/espressif/arduino-esp32/tree/master/libraries/Preferences). Tutorial on using the library: https://www.hackster.io/wayland2/access-esp32-non-volatile-storage-using-xod-252ec9
NodeDescription
begin
Opens storage with specified namespace. If RO (read only) is set to false, then storage will be opened in read/write mode. If namespace does not exist, then it will be created if RO is set to False. If namespace does not exist and RO is set to True, then the node will raise an error.
end
Close the open namespace.
erase-nvs
Erase and re-initialise non-volatile storage (NVS).
example-boot-count
Patch to demonstrate how to record the number of times the ESP32 board has been booted. Result is displayed on an LCD.
example-erase-nvs
Running this patch will erase all data from non-volatile storage.
example-remove-key
Patch to demonstrate how to remove a key-value pair from a preferences namespace. Run in debug mode.
clear
Clear all preferences under the open namespace (it doesn’t delete the namespace).
example-store-retrieve
Patch to demonstrate how to store and retrieve common datatypes (byte, number and string) from NVS. Run in debug mode.
get-byte
Retrieve specified byte from currently open namespace. If record does not exist, the Byte pin will output 0.
get-number
Retrieve specified number from currently open namespace. If record does not exist, the Num pin will output NaN.
get-string
Retrieve specified string from currently open namespace. If record doesn't exist, the String pin will output "NA".
preferences
Create a preferences object.
put-byte
Store a byte identifiable by Key in currently open namespace.
put-number
Store a number identifiable by Key in currently open namespace.
remove
Remove the specified key-value pair from the open namespace.
put-string
Store a string identifiable by Key in currently open namespace.
To use the nodes in your project you should have the wayland/esp32-preferences library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.