My machine is running, but the robot halts quite often. It's relay-handshaking to my modules that serially connect to RR. I'm still not sure, but it looks like characters are being missed between my modules and RR.
So, I wanting to know if there's a 'most-suitable' method to communicate serial data with RR. I feel the serial-read is vulnerable, but I did not know that early on in the project.
At the moment, as a mechanism moves, it might send out 'a', then a while later, 'b', and later, 'c' to RR. Between all the processing, a character might be missed.
An alternative is to continuously send to RR, aaaaaaaaaaaaaaaaabbbbbbccccccccc as the mechanism moves, but surely k will get missed in; aaaaaaakaaaaaaaaaabbbbbbccccccccc
The third way is to send out *a,x,x,x*a,x,x,x*b,x,k,x*b,x,k,x*c,x,k,x packets
where * marks start of field, then all other parameters. This I presume is the best method, but my concern is whether this will slow processing down on RR's side.
Also, on any given pass, will RR see the full packet?, or maybe just an 'a' on the one pass, then a * on the next?
What buffering of serial data takes place? How does RR handle the serial in, and what is it looking for?