Serial communication programs - C vs Python -
i have mcu, responds through serial communication. issue following: code worked last week.
ser = serial.serial(3,115200) b = ser.write('\x5a\x03\x02\x02\x02\x09') print b time.sleep(1) c = ser.read(7) print c.encode('hex')
this supposed print bunch of bytes read mcu. today, reading random bytes not supposed read. once in while read exact bytes supposed read. thought problem laptop serial ports. friend program written in c on same laptop - able read properly. so, dont know question here - problem dont know how troubleshoot. python code basic, should work. thoughts on going on appreciated.
Comments
Post a Comment