Parsing data from pyserial (final resolution)

2006-12-05 Thread Lone Wolf
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

Parsing data from pyserial, an (inefficient) solution

2006-12-03 Thread Lone Wolf
I want to thank everybody who tried to help me, and also to post my solution, even though I don’t 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

Parsing data from pyserial

2006-12-02 Thread Lone Wolf
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