USB serial communication arduino nano and jetson nano

I want to communicate between Jetson nano and arduino nano through serial.

I wrote a simple script to test functionality but I receive strange data

here is the arduino code

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  
  Serial.println("work fine");
  delay(10000);
}

and this is the python code run on jetson nano

import serial
import time

arduino = serial.Serial('/dev/ttyUSB0', 9600, timeout=1)

while True:
  try:
     data = arduino.readline()
     if data:
        print(data)
        print('Hi Arduino')
  except:
     arduino.close

the output is

b'\x17\x0f\t\x0b\x01\x06\t\x0e\x15\r\n'
Hi Arduino

if tried different baud rates but nothing change.

when is use serial monitor on windows it works fine.

Hi there @abdelrahman.shamaa and welcome to the NVIDIA developer forums!

I think you might find better support in our dedicated Jetson Nano category. I moved your post over for your convenience.

Thanks!

1 Like

Hi,
There is constraint in Jetson Nano. Please check this:
Nano ttyTHS1 receive data lost - #21 by DaneLLL

For receiver, please run in higher baud rate and give it a try.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.