Search found 1 match
- Thu Jan 27, 2022 10:21 am
- Forum: General Discussion and Questions
- Topic: UART write int array
- Replies: 1
- Views: 4140
UART write int array
hi what is the best way to write an int array to uart? I've never used python, maybe my conversion from int[] to string is wrong: array = [42, 86, 127] buf = '' for i in array: buf += chr(i) uart.write(buf) [edit] ok, i solved it like this: array = [42, 86, 127] byte_array = bytearray(array) uart.wr...