2 years, 4 months ago.

Control mbed with python 2.7

I want to control the mBed controller with https:mindmajix.com/python-training I tried this code as start

from mbedrpc import *

serdev = '/dev/tty.usbmodemfa122'

mbed = SerialRPC("/dev/tty.usbmodemfa122", 9600)

x = DigitalOut(mbed, "LED1")


It always shows me this error

File "/Users/Desktop/testRPC/mbedrpc.py", line 78, in __init__
AttributeError: 'Serial' object has no attribute 'setBaudrate'

Could someone help me please ?

1 Answer

2 years, 4 months ago.

Hello Tejaswini,

Your pySerial may need to be updated. Could you take a look at this post and see if it solves your problem?


Hope this helps!

-Karen, team Mbed

If this solved your question, please make sure to click the "Thanks" link below!