Thanks, but i should have mentioned the idea is that if i move one of the m5stacks around, connecting it into a different position 1-20 it would be able to report back its position.
Modbus concept actually is realy close, but seems that when one of the devices is detached the others become undetectable.
Anything else similar to this?
At one point i considered using a 2 layer switch with associationg each position with a port on the switch, but was wondering if there's a more cost effective method using serial.