[PySerial] AttributeError
Verfasst: Samstag 16. März 2013, 16:05
Ich habe folgendes kurzes script geschrieben...
nun habe ich aber da problem wenn ich das Script mit Python3 start kommt
Ich nutze wie man sieht Linux, und wolte dazu ein kleines Echoscript zu meinem Arduino schreiben.
Der Arduino code funktioniert
danke für eure hilfe schonmal
Code: Alles auswählen
import serial
s = serial.Serial(port='/dev/ttyACM0', baundrate=9600)
while 1:
s.write(input('Send: '))
print ('got: ' + s.read())
Code: Alles auswählen
christian@SchmiedC2:~/Dokumente/[Python]$ python serial.py
Traceback (most recent call last):
File "serial.py", line 1, in <module>
import serial
File "/home/christian/Dokumente/[Python]/serial.py", line 2, in <module>
s = serial.Serial(port='/dev/ttyACM0', baundrate=9600)
AttributeError: 'module' object has no attribute 'Serial'
Der Arduino code funktioniert
danke für eure hilfe schonmal