我想用python 2.7控制mBed控制器 我尝试了这段代码作为开始
from mbedrpc import *
serdev = '/dev/tty.usbmodemfa122'
mbed = SerialRPC("/dev/tty.usbmodemfa122", 9600)
x = DigitalOut(mbed, "LED1")
x.write(1)
它总是显示我的错误
File "/Users/Desktop/testRPC/mbedrpc.py", line 78, in __init__
self.ser.setBaudrate(baud)
AttributeError: 'Serial' object has no attribute 'setBaudrate'
有人能帮帮我吗?