If I run the python script on a Pi5 with USB cable to an Arduino running a sketch that waits for the message from the Pi then responds, it all works fine. Then we can CTRL-C out of it and run it again - all OK.
I am not sending any "\n" at all. Note ASCII STX is 0x02 in hex, ETX is 0x03 in hex
Code:
Connected to /dev/ttyUSB1 at 19200 baudSent: STX{"transaction": "Sale", "price": 102}ETXWaiting for response...BYTES ARE WAITING 18Received:ABCDEFGHIJKLMNOPI am not sending any "\n" at all. Note ASCII STX is 0x02 in hex, ETX is 0x03 in hex
Statistics: Posted by neilgl — Thu Mar 20, 2025 12:40 pm