HEX/Byte to ASCII in Micro Python #13575
Replies: 4 comments 11 replies
-
or as shorter output in base64 encoding:
|
Beta Was this translation helpful? Give feedback.
-
There is something else wrong with your connection, not the encoding. Baudrate? Missing GND wire? |
Beta Was this translation helpful? Give feedback.
-
I'm interested in this. Could you please share your circuit diagram of 1 master and 2 slaves sharing a UART? Assuming that this is indeed the case, both TX lines of the 2 slaves are connected to the RX of the master. Won't these two TXs interfere with each other and just produce noise to the master RX? It is not clear to me how the control_buffers pins are used to control the flow of data from the slaves and the master. Maybe I'm missing something here. |
Beta Was this translation helpful? Give feedback.
-
I've been playing around with multi-host UART communication. For those interested you can find my results here. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! Im trying to convert a var to ASCII in uPy but didnt work. I read the var from my UART Port and this var has a byte value, and I need to convert this to ASCII. I tried to use .decode('ascii') but failed.
Master code:
Slave code:
Console:
b'\x00\xc8\x00\xf0\x00\xfa\x00\xfe\x00\xff\x00\xfe\x00\x00\xff\x00\xfe\x00\xfe\x00\xff\x00\xfc\x00\xff\x00\x00\xf8\x00\xff\x00\xff\x00\xfc\x00\xfc\x00\xf8\x00\xfc\x00\xfc\x00\xff\x00\xff\x00\xff\x00\xfc\x00\xff\x00\xfc\x00\xfe\x00\xfe\x00\xfe*Y\x01\x00\xfc\x00\xfc\x00\xff\x00\xff\x00\xf8\x00\xfe\x00\xfc\x00\xff\x00\xff\x00\xfe\x01\xfe\x00\xff\x00\xf8\x00\xff\x00\xfe\x00\xfe\x00\xff\x00\xfe\x00\xf8\x00\xfc\x00\xfe\x00\xfc\x00\xf0\x00\xfe\x00\xfe\x00\xfe\x00\xf8\x00\xfe\x00\xfe\x00\xfe\x00\xfc\x00\xfe\x00\xfc\x00\xfe\x00\xfe\x00\xfe\x00\xfe\x00\xf8\x00\xfc\x00\xff\x00\xfc\x00\xfc\x00\xf8\x00\xfc\x00\xfc\x00\xfc\x00\xfc\x00\xfc\x00\xf8\x00\xf8\x00\xf8\x00\xfe\x00\xfe\x00\xfe\x00\xfc\x00\xfe\x00\x00\xff\x00\xfc\x00'
Beta Was this translation helpful? Give feedback.
All reactions