using examples from Nick's RS485 page.
to be honest, i have read through the rolling master code several times, and my mind just can't seem to grasp what exactly it is doing, so it is difficult to adapt it.
firstly, i am not crazy about having to store in EEPROM the total number of devices. i think it needs just one device to broadcast the setting at initiation, or whenever needed. this would save upgrade headaches.
my intended use of the project is for a model train layout, where i will have remote modules around the layout. each remote module will be configured for it's locations needs. in other words, each device will have some common code for the RS485 protocol, but what it does with it will be independently coded. but there will really only need to be one master, so to speak. it will receive commands via a serial port, and then broadcast the data to the RS485 bus (when it has it's turn), the device that has been coded to use the data will parse it, while all others ignore it.
the data will be simple, in that it will have a function ID, a command number, and a value. the device is responsible for figuring out what this data tells it to do. and if needed, such as checking a sensor value, or a group of values, the device will wait it's turn to send back the needed data. again, the function ID, so it knows where it came from, the command number that requested it, and the value, or perhaps a set of values.
now i just have to figure out how to apply this all to the code from Nick's example.
i haven't ventured out of the "Bar" in a while, so please go easy on me ;)
On this project i have just gotten so mentally overwhelmed trying to figure it out that i am not sure where to even start.