Serial.write 1,2,4 or 8 to Aduino with Jetson Nano

Hey,

For steering my robot my Arduino nano expects a 1 for left or a 2 for right every 15 mS. This worked out fine with a RaspberryPI. Over the RX/TX pins.

if i try:
ser.write(‘11111’) on raspberry this works on jetson it errors - please encode to bytes

ser.write((char)‘11111’) is an invalid syntax

while True:
for i in range (1, 10):
ser.write(b’1’)
time.sleep(0.15)

does something but the read function shows other numbers (serial monitor) in between a line of 1’s. This yitter makes my robot lose balance and fall.

how can i have a clean line of outgoing data over the RXTX pins?

The ground line is there and i use a lvl converter 3.3 to 5 volt

Hope to solve this with your help, thanks

hello b.vanderhaagen76,

there’s default baudrate at 115200/8n1.
you may have a try to stop and disable the nvgetty service for verification.
for example,

$ systemctl stop nvgetty
$ systemctl disable nvgetty

please also check this topic for reference, Jetson Nano how to use UART on /ttyTHS1.
thanks