Pages: [1]   Go Down
Author Topic: What's the best way to do basic serial communication in Python on Win7?  (Read 1002 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 220
Posts: 13846
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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/ -
Logged

Rob Tillaart

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

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Aha! The installer version worked like a charm.

Thanks!
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 220
Posts: 13846
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
Logged

Rob Tillaart

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

Pages: [1]   Go Up
Jump to: