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.