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
- // Store data
- preferences.putInt("boot_count", 42);
- // Read data
- int bootCount = preferences.getInt("boot_count", 0);
- Serial.println(bootCount);
- preferences.end();
- }
- void loop() {
- // Your loop code
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement