I don’t know much about python, but I had to use it. I installed the serial library via pip3, everything went smoothly, the 'import serial' error does not produce errors, but in this code:
import serial r = serial.Serial('com3', 9600) f = open('C:\statistic\stat.txt', 'w') e = 0 while(e == 0): t = int(r.readline()) print(t) f.write(str(t)) f.close() gives an error message:
File "", line 1, in
ser = serial.Serial ('COM3')
AttributeError: module 'serial' has no attribute 'Serial'
serial.py? - jfs