thearn / Python-Arduino-Command-API

A Python library for communicating with Arduino microcontroller boards
414 stars 151 forks source link

Servos.attach does not work #11

Open filloz opened 10 years ago

filloz commented 10 years ago

Hi, I'd like to control one servos with your python module. I have a MacBook and I'm trying to use python with arduino Yun. I inizialize the board with

board = Arduino("9600",port = "/dev/tty.usbmodemfd131")

and all is ok when i try to inizialize Servos typing:

board.Servos.attach(9)

the python sheel freezes What do I wrong ? thanks Filippo

tdimov93 commented 7 years ago

I have a similar issue, except the terminal doesn't freeze but throws an error instead :

File "/usr/local/lib/python2.7/dist-packages/Arduino/arduino.py", line 451, in attach position = int(rd) ValueError: invalid literal for int() with base 10: '\x85'

The literal that's causing problems is different everytime.