UART Communication problem between Nvidia Jetson Nano and Arduino Mega

I want to make connection between Jetson Nano and Arduino Mega 2560. Arduino send “18” value when button pressed and Nvidia has to send number value between 1-4. Arduino can send data correctly but Nvidia send wrong almost 90%. Sometimes send 103, 76, 205 etc… But it must to be 1,2,3,4. I use for this connection RX0/TX0 pin of Arduino and GPIO 8/10 (ttyTHS1) of Jetson and Arduino send data right but Nvidia send sometimes wrong value. I tried 9600 and 115200 baudrate for communication.

Typically the pin 8/10 TX/RX is being used by the serial console. What do you see, on the Jetson, from:
ls -l /dev/ttyTHS1 /dev/ttyS1

Note that “ttyTHS1” and “ttyS1” would be the same hardware, but two different drivers. It is ok if only one is present.

If the group is “dialout”, then probably console has been properly disabled. If group is instead “tty”, then what you are receiving is what a login shell is responding with due to what it would have perceived as “nonsense”.

If this is a serial console, then just to show you what it is doing, you could connect a serial console program to those pins via a 3.3V serial UART cable, and at the host PC end set it to 115200 8N1. You would see log output as the system boots, and could even login through that terminal after boot completes. If it is a serial console, then this can be disabled.

I tried one thing. If I plug Arduino to electricity or pc this time Nvidia sends numbers that I didn’t defined. But when I connect arduino to Nvidia this time all values are right. I think there is voltage, gnd or something like this type problem

What did you see from “ls -l /dev/ttyTHS1 /dev/ttyS1”? Also, if worried about voltages, is your USB serial UART running at the correct 3.3V level?