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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -