loading
Picture of Interface Python and Arduino with pySerial
Logo.png
Over the last few months I have learned how to program with Python. With one of the upcoming projects that I am working on it would be nice to have a computer’s display to view the data collected by a rover in real-time as well as crunch numbers while the rover completes its  mission. The rover will have an Arduino as a brain. What I found after some searching was pySerial. This is a really neat piece of software that allows Python to send and receive data much like the Serial Monitor does.

pySerial is available to download at


Step 1: Installation

Picture of Installation
Once you download it open up Terminal and type in:

tar xfvz /Users/*Account*/Downloads/pyserial-2.6.tar.gz
cd pyserial-2.6
sudo python setup.py install



To make sure that everything installed correctly open up Idle and type in 'Import Serial'. If no errors appears then everything is good to go.

You can check the available ports with the line

ls /dev/tty.*
 
brorobw2 months ago

Got me going!

vtank115 months ago

Where on python does this get printed? I am running the python script and also opened up the serial monitor on Arduino. It reads "Ready" and that's about it. Nothing else seems to happen. Is there a serial monitor-type thing I need to open on IDLE? Please help me. I need to figure this out for my project ASAP.

kbarre1235 months ago

Easy enough!

russ_hensel made it!5 months ago

liked the idea, decided that having its own gui and easily adjustable parameters would be good. http://www.instructables.com/id/Python-Terminal-fo...

PythonTerm.pngTerminal.gif
Katal1 year ago

Thank you for the tutorial, it is really useful. Just one question: Is
it possible to reuse somehow Arduino libraries to interface Arduino
shields (gsm.h) from Python?

Abu10baker Katal7 months ago

oh yes :D

gothma9 months ago

Excellent tutorial, just what I needed to start reading data from my 'Barometric Differentiation Engine'

Thanks

pauwy11 months ago

Nice! it work for me, the only change I made was instead of

('/dev/tty.usbmodem1d11', 9600) I used (2) what is the COM3 port.

Thanks

pauwy11 months ago

Nice! it work for me, the only change I made was instead of

('/dev/tty.usbmodem1d11', 9600) I used (2) what is the COM3 port.

Thanks