Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Preferences.h>
- Preferences preferences;
- void setup() {
- Serial.begin(115200);
- preferences.begin("my-app", false); // Initialize preferences storage
- // Store a value
- preferences.putInt("key", 123);
- // Retrieve the value
- int value = preferences.getInt("key", 0);
- Serial.println(value);
- preferences.end();
- }
- void loop() {
- // Your loop code
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement