Tutorial on programming devices?
Peter Hansen
peter at engcorp.com
Wed Mar 19 07:43:17 EST 2003
Wouter van Marle wrote:
>
> www.pyhton.org is a very valuable source on these things.
Even more valuable is http://www.python.org !
> And besides that, isn't reading/writing from some port (almost) the same as
> read/write to a file? Just use /dev/ttySxx (with xx your port number) as
> filename. Supposed to work like that (never tried myself). Just a thought.
The OP didn't specify which platform he was using. If it's Windows,
the above won't work of course, as you pointed out... in either case,
using http://pyserial.sourceforge.net/ is his best bet. That
module will allow greater control over various aspects than the raw
/dev/ttySxx approach and this sort of thing is often, though not
always, essential for talking to devices such as a GPS.
To the OP: check the link above and the archives for similar questions
and examples. If you still need help after that, feel free to post
here again!
-Peter
More information about the Python-list
mailing list