Hey there -
Using 4 to 5 arduino devices in this project, which is sort of up in the air - been evaluating different boards and protyping different circuits that they'd manage, web server REST calls, 12V circuits they'll integrate with, sensors they tap into and finally - communications between them. IMO the latter has been the biggest challenge in my testing. Time suck.
My need is to have one master device that handles the logic, routes the communications down to the slaves with directives for them to follow, and makes server calls for data insights that the servers have compiled for them to disseminate to the slaves.
Each of the slaves have different functions that they manage with their sensors. So I need to establish unique identities for each of the arduino devices, chiefly so that the master knows what address to send data to respectively. The slaves will need to know their role once they're plugged into the bus, given an address and UUID, and then retain it.
I2C has been the assumed backbone for the communications. Tests have been with 3 devices and the results are spotty, sometimes slaves don't respond, but ATM I'm assuming that's on me to figure out, not the devices. Unless there are some known gotchas that I don't know of yet. The data I'll pass back and forth is probably about 150 bytes, I can masage that as needbe. If it was JSON I would be thrilled, but don't see that's the most prudent choice.
I have an RTC device, a couple displays (would love to stick with I2C, but one might be a feather backpack which is SPI), a couple I2C temp sensors, 3 other sensors which are just RTD on digital ports. Is this the start of address hell?
This master will make HTTP posts, process the response to actions and then disseminate themto the slaves. The slaves will report back with current results - anywhere from every 5 seconds, to every 10 - 20 if that's going to work better. Processing that much on the other end will be a big enough challenge.
I'm primarily worried about the bandwidth with 3 devices chatting almost constantly. Have looked at Sofware serial as an option, maybe some other mechanism for a communications channel / protocol exsits I don't know about?
I can either store the identity and some profile data they'll have associated with their identity, in EEPROM of each device and the master with a lookup table of sorts. OR I can use an SD device to store that data, and all data, I picked up an adalogger this weekend to play with. Should I stick with EEPROM and not go down a rabbit hole with the SD?
So basically I'm wondering if you have thoughts about the approach to I2C, EEPROM and anything else that comes to your bigger brains. Any holes you can poke in my logic / approach would be awesome!