Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Wait for Arduino Before Sending Data Over Serial

$
0
0
While not needing to do exactly what you are doing I am using the Arduino-SerialCommand library that was originally devised by Steven Cogswell and modified by Stefan Rado to send commands with arguments to an Arduino from Processing. I see that SerialCommand was initially created for stepper motor control so perhaps it is suited for what you are doing. On the Adruino side you can control the SerialCommand input buffer size. So I would think you could make sure your Processing side data sender sends data within that buffer size. This SerialCommand library fills its input buffer with incoming data while waiting for an incoming \n to signal the end of the command stream. It then looks at the first word in that command stream to assoicate with callback routines that you create to process whatever is in the input buffer. Maybe that communication scheme will work for you.    

Viewing all articles
Browse latest Browse all 1768

Trending Articles