Go Down

Topic: What's the best way to do basic serial communication in Python on Win7? (Read 1 time) previous topic - next topic

I'm trying to write a program in Python 2.7 to control two servos over serial with an Arduino Mega and Adafruit motor shield.

I'm running windows 7, and cannot for the life of me figure out how to install Pyserial, which should do everything I need it to do.

According to this:

http://playground.arduino.cc/interfacing/python

Quote
After installing pySerial, reading data from Arduino is straightforward... Writing data to Arduino is easy too:


Installing PySerial on Win7, however, seems to require a Ph.D in Python. For starters, the only file I could find to download to install PySerial, is a tar.gz file, which, as far as I understand, only works on Linux.

Is Firmata a better option? It seems more complicated to use than PySerial would be if I could get it to work. All I really need is basic send/receive stuff.

robtillaart

a tar.gz file can be opened by 7-zip - a windows program

or use the installer version - http://sourceforge.net/projects/pyserial/files/pyserial/ -
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


robtillaart

Quote
The installer version worked like a charm.

Can you post some working code when your project succeeds.

The question how to interact with Python pops up every now and then :)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up