0
from serial import serial
joystick = serial.Serial("COM3", 9600)
joystick_x = joystick.write('0')
if joystick_x==1023:
print("Right")
elif joystick_x != 1023:
print("Not right");
,我收到錯誤消息:AttributeError的:模塊「系列」有沒有屬性「系列」
Traceback (most recent call last):
File "C:/Users/Mine_science/Desktop/snu6/산출물/arduino.py", line 1, in <module>
from serial import serial
File "C:\Users\Mine_science\AppData\Local\Programs\Python\Python35\lib\site-packages\serial\serial\__init__.py", line 13, in <module>
from serial.serialutil import *
ImportError: No module named 'serial.serialutil'
,你也可以給我一些建議讓每個引腳。
的文檔你有沒有在你的應用程序文件名爲串行的.py? – e4c5
標題中的錯誤消息與正文中的錯誤消息不匹配。你究竟得到了哪一個? – ForceBru