Closed gooyle closed 1 year ago
hi,i‘m using usart function:uart.write(input) to send message to another pyboard,but the input must be string. Is there any other function available to send integer format data? thx very much!!!
usart function:uart.write(input)
integer format data
You can use the struct module to encode integers as bytes, eg: uart.write(struct.pack("<I", 1234)).
struct
uart.write(struct.pack("<I", 1234))
hi,i‘m using
usart function:uart.write(input)
to send message to another pyboard,but the input must be string. Is there any other function available to sendinteger format data
? thx very much!!!