79719843

Date: 2025-07-30 11:08:37
Score: 1
Natty:
Report link

storing these three type of data

You don't. The information you store should be rarely changing. The actuator state should be determined by sensor reading for current state, not assuming that whatever in memory is accurately after whatever issues.

You mention ESP-IDF, the built in NVS library, and in micropython too, has wear leveling built in.

What you're asking for:

  1. Boot
  2. Read NVS(Management Config, User Config)
  3. Read Sensor State
  4. Do Thing as Needed Repeat from 3
  5. Update NVS if Management, or User Config is changed.

Improved Design:

Don't bother storing these things at all.

  1. Connect to server, reporting hard serial / machine id / MAC
  2. Download control logic
  3. Read sensor / actuator state off pin
  4. Perform action.
  5. Re-download control logic if notified.

Then all your controllers are programmed the same, centrally managed, easy to backup, easy to replace, no wear leveling to bother with, no local user input or ui to bother with.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Zac