[Tutor] how to read over serial port
Roel Schroeven
rschroev_nospam_ml at fastmail.fm
Sun Nov 2 10:26:42 CET 2008
shawn bright schreef:
> Hey there all,
>
> I have a gps device that talks to the computer over a serial port.
> i am using the pyserial module and getting values in.
>
> Here is my delima,
>
> i am supposed to read a message in that starts with a $ (this is all ascii).
> but when i do a ser.read(16) and i try to print it to a screen, it is
> all just weird characters.
Are you sure you opened the serial port with the correct baudrate and
other settings? It's common to see unexpected characters coming from a
serial port if you use the wrong baudrate.
--
The saddest aspect of life right now is that science gathers knowledge
faster than society gathers wisdom.
-- Isaac Asimov
Roel Schroeven
More information about the Tutor
mailing list