Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 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") x.write(1)
It always shows me this error
File "/Users/Desktop/testRPC/mbedrpc.py", line 78, in __init__ self.ser.setBaudrate(baud) AttributeError: 'Serial' object has no attribute 'setBaudrate'
Could someone help me please ?
1 Answer
6 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!