Accessing data from RX on Jetson from Arduino Mega

Hello,

Forgive my ignorance. I have a connection between the Jetson tx2 and Arduino mega via usb which I am using to transmit serial information constantly. I have a compass sensor that I need to read data from on the Jetson.

Doing read/writing simultaneously over USB is giving me jittery responses when controlling other items, such as motors, so I wanted to send data from the mega from TX3 to the RX pin on the Jetson. My question is: how do I access the RX (pin 10) in python using pyserial? I have seen many tutorials referncing /dev/ttyAMA0, although I have not been able to get this to work.

Thank you.

Hi ripke1tj,
We don’t have experience in this case. Have you seen other working cases on PC or other embedded platforms?

Hi, ripke1tj.

Just going to preface this and say this isn’t area of expertise but some questions and suggestions:

You have a USB connection to your Arduino Mega (2560?) one end is plugged into the Jetson USB port and the other end plugged into the USB port (type b) on the Arduino Mega treating it as a serial device?

Forgive my ignorance. I have a connection between the Jetson tx2 and Arduino mega via usb which I am using to transmit serial information constantly

You want to open a bi-directional serial connection between both devices?

Doing read/writing simultaneously over USB is giving me jittery responses when controlling other items, such as motors, so I wanted to send data from the mega from TX3 to the RX pin on the Jetson.

Can you elaborate on ‘jittery responses’? What do you want to happen and what is happening?

Have you ensured things like baud rate, stop bit(s), start bit(s), parity are set correctly on both ends?

Can you provide snippets of the code from your Arduino? In particular where you read data from the Jetson and do something with it.

I suspect it may be a problem with either timing or your Arduino/pySerial software.

David

DaneLLL and david_evans_g,

Thank you for your help. After doing some additional research and debugging, I quickly realized that it was an error in my code (multi-threading). I understand now that RX and TX have separate lines and should not interfere with each other when trying to read and write at the same time. I was able to get the system working.

That’s great, ripke1tj!

If you could mark this thread as ‘answered’ just so someone with a similar issue in the future can this solution.

David.