i have a question about best practice to achieve what i want to do. I would like to have a sketch setup, and then to be able to deploy to different devices of the same type, but each device/node will have a few different parameters, like ip address and mqtt topic etc,

What would be the quickest way to be able to upload new changes to all of my nodes without having to track my changes and update each seperate sketch for each node?

I was thinking about using some IFDEF statements if i can figure out how to? would that be the best way to go or is there something better?

Thx in advance

  • Why not just store the parameters in EEPROM? Sep 18, 2017 at 17:46
  • I don't really know how to do that or how it would work in solving my problem.. it's not something i've done before.. can you point me to further info?
    – gambituk
    Sep 18, 2017 at 17:51

1 Answer 1


You can put the per-node parameters in a external EEPROM and load them during setup(). For example the IP address is the first 16 bytes of the eeprom (IPv6), the next bytes would the the topic, etc..

That way every node has exactly the same sketch and the customization is in the eeprom that you could put in a socket and possibly have a separate programmer for them.

EEPROMs with I2C interface are easy enough to get and can store 64kB. Which should be more than enough for most things.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.