Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blinking an LED with an Arduino and pySerial

I feel really silly for asking this, but I've been shocked at my inability to find the simplest example I can imagine for talking to an Arduino over Serial. I have a connection set up, and I understand how to write both Arduino Code and Python, but I have no idea how to write to an arduino pin using python. Can anyone point me to a location with this example or show me how it's done?

like image 806
Slater Victoroff Avatar asked Feb 11 '13 05:02

Slater Victoroff


1 Answers

The official page on interfacing Arduino with Python is here:

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

If you need a "real" example you might want to have a look at my VU meter experiment. I use python to push the volume data into the Arduino. Nothing fancy but it should give you an idea.

http://blog.blinkenlight.net/experiments/basic-effects/vu-meter/

like image 73
Udo Klein Avatar answered Sep 29 '22 08:09

Udo Klein