The delay's are not the problem, there are the solution. I got some timing problems between the recieving data, editing it, and sending it back to the Master.
pevloc:
The delay's are not the problem, there are the solution. I got some timing problems between the recieving data, editing it, and sending it back to the Master.
Here are the main procedure:
MASTER sending data to first SLAVE
SLAVE sending back data to MASTER
This for 15 slaves...
Thank that over serial not RS485! how you wired them all up?
I suspect the Serial1.parseInt() is the problem because it blocks until it receives a value.
Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.
The technique in the 3rd example will be the most reliable.
You can send data in a compatible format with code like this