Blogs

Arduino Analog Input Data Sent To Python

GroG's picture

To retrieve analog data from an Arduino and send it back into Python for further processing the following script should work.

On every pin value change event a new Pin object is sent from Arduino to Python.

The pin.pin is the number of the pin whose value has changed - this is necessary so you map poll multiple pins at the same time.

pin.value is the value from the pin - for analog pins its 0-1023

pin.source is the Arduino's name for which the pin came from (if there are multiple Arduinos)


3 MakerFaire Projects

Alessandruino's picture

InMoov Head

 

 

head will track with both eyes and neck using 3 PID - it will have manual mode with joystick ?

PARTS

  • 3 Servos
  • Arduino
  • Netbook

TODO


Network Problems

GroG's picture

myrobotlab.org is hosted on Amazons AWS cloud services - guess where ? :(


InMoov / Python Service WORKY ! - Build 1694

GroG's picture

The Python service had a bug which did not allow callbacks from other Services.  Listeners could be set up which were supposed to call different methods in Python, but ended up only calling the first called method.

an Example would be :