I’m trying to write a script to process serial port input. When running the script on a WR31 the above error appears
Full Code:
import sys, select, socket
fr = open(“asy/00”, “r”)
fw = socket.socket( socket.AF_INET, socket.SOCK_STREAM)
fw.connect((‘104.152.164.20’,1999));
input = [fr]
while 1:
inputready,outputready,exceptready = select.select(input,[],[], 1.1)
for d in inputready:
if d == fr:
data = d.read()
if data:
fw.write(data) #Echo the data that was read
fw.flush() #Send the data to the serial port
print("tick")