How to receive MSB ans LSB values to convert on integer python -
i have problem code.
i need receive msb , lsb 10 bits data picaxe kit, dont know how can convert msb ans lsb on integer can use.
i try that, dont works
x in range(1,400,10): msb = ser.read(2) lsb = ser.read(2) datos = (msb*256)+lsb print datos degree = float(int(datos,2)) linea = (432,200) linea_len = 100 x = linea[0] + math.cos(math.radians(degree)) * linea_len y = linea[1] + math.sin(math.radians(degree)) * linea_len
how can receive msb , lsb picaxe serial??
thanks you
Comments
Post a Comment