07-16-2009 03:21 AM
Hello,
This is a quick question, is it possible to have one program, continuously reading information from one COM Port, while another COM Port is writing information.
One port is continuosly recieving distance information from an ultra sonic sensor wireless via a Xbee module and MAX3232 Chip. Based on that information, the other port will control the direction and speed of a motor.
Is this possible?
Solved! Go to Solution.
07-16-2009 04:10 AM
Yes
a possible architecture: two independent loops, the first read the values and send them via queue to the second loop that controls the motor.
Where to handle the timeout (no value from the sensor) is up to you....
07-16-2009 05:32 PM
Guten Tag,
Ah, yes the mighty timeout! LOL I think the default 10seconds will be enough. If I use a termination character it should be ok. The motor is lowering a sensor down a pipe. Bascially, the ultratronic sensor is at the bottom of the sensor to make sure the motor stops when it reaches the bottom of the pipe.
Thanks for the help
K
Kamilan heft mere Hmmmmmmm - yes i know its not german! 😛