I am currently working on a telepresence robot using Roborealm. From a remote computer, I am able to login to the roborealm webserver and drive the robot around albeit in a rather careless way. What I find is that the ethernet/internet link can have erratic timing which leads to imprecise robot movements. I have been working on a way of sending a command to the arduino, and then allow the arduino to carry out a series of precise autonomous movements.
For example, I want the robot to turn 90 degrees left, 90 degrees right, or rotate 180 degrees. This requires the use of encoders. Instead of using the Encoder functions built in the Roborealm Arduino module, I have elected to run the encoders using a library on the mega.
To send a remote command, I set a value of 90, 180, 270 on PWM "pin 6". While the arduino executes the motion, I have roborealm monitor "Pin 51". LOW means the arduino is busy, and no additional motion commands should be sent. HIGH means the autonomous command is complete, and either manual or autonomous instructions may be sent.
In my module stack, I have the Arudino Mega module in the first position, and the CScript is in the second position. I have a few other camera, and image processing modules in 3rd through 6th position.
My question relates to timing. If I change a variable in the CScript (located in stack position #2), is the variable immediately sent via the serial line, or is the variable updated once the software has cycled through the remaining four modules, and returns back to the Mega module in position #1.