I had this code:
- #include <Preferences.h>
- Preferences preferences;
- void setup() {
- Serial.begin(115200);
- String keyToAdd;
- String valueToAdd;
- keyToAdd = Serial.readString();
- valueToAdd = Serial.readString();
- preferences.begin("licence",false);
- preferences.putString(keyToAdd.c_str(), valueToAdd);
- preferences.getString("roomname_long",valueToAdd);
- Serial.println(valueToAdd);
- preferences.end();
- }
- roomname_long
- Test