After going back and reading everybody's suggestions, I finally
got a simple, efficient solution. As was pointed out to me in
several posts, I needed to use readline rather than read. That's
obvious to me now ... but isn't everything obvious once you
understand it :)
Anyway, I am posting my code o
I want to thank everybody who tried to help me, and also to post
my solution, even though I dont think it is a very good one.
Many of you correctly guessed that there was an \r included
with the packet from the CUMcam, and you were correct. The
actual format of the packet is: M xxx xxx xxx
I'm trying to get data through my serial port from a CMUcam.
This gizmo tracks a color and returns a packet of data. The
packet has nine data points (well, really eight since the first
point is just a packet header) separated by spaces as follows: M
xxx xxx xxx xxx xxx xxx xxx xxx
Here is the code