import serial
ser = serial.Serial("/dev/ttyS0", 115200, timeout=1)
#ser.write(open("Config_DollarDollar.txt","rb").read())


serialcmd = '[ESP100]\n'
serialcmd = '?\n'
ser.write(serialcmd.encode())

print(serialcmd)

f = open("Config_DollarDollar.txt","rb")
#for l in f:
    #print(l)
    #ser.write(l)

print("test")

while ser.in_waiting > 0:
            line = ser.readline().decode('utf-8').rstrip()
            print(line)
            
ser.close()