Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8026

Beginners • Re: Unstable usb serial reception RPI5

$
0
0
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.

Code:

Connected to /dev/ttyUSB1 at 19200 baudSent: STX{"transaction": "Sale", "price": 102}ETXWaiting for response...BYTES ARE WAITING 18Received:ABCDEFGHIJKLMNOP
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

Statistics: Posted by neilgl — Thu Mar 20, 2025 12:40 pm



Viewing all articles
Browse latest Browse all 8026

Trending Articles