So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Ice Cold
#91454 Hello everyone! I need to store config for my device so it can be updated easily via REST API . Now, what I do is just storing a json file like this
Code: Select allHello everyone
{

  "ap_name":"myDEvice",
  "ap_password":"mypassword",
  "ap_maxconn": 2,
  "ap_channel": 6,
  "sensors":[
    {
      "id":"sensor1",
      "pin": 0,
      "threshold": 0,
      ...   

    },
    {
      "id":"sensor2",
      "pin": 1,
      "threshold": 0,
      ...
    }
  ]
}

which I handle with ArduinoJson. To update some of the params I need to read the whole file, update desired json element and write it back. Possibly there are some better ways to do so ?