UARTDemo

UART Demo Code

MIT License

Stars
45

UART Demo Code

This is currently a simple Python 3 script to interface with the UART on the J41 header of the NVIDIA Jetson Nano Developer Kit.

Original article on JetsonHacks: https://wp.me/p7ZgI9-31I

$ systemctl stop nvgetty
$ systemctl disable nvgetty
$ udevadm trigger
# You may want to reboot instead

The script opens up the serial port ( /dev/ttyTHS1 ), writes a simple header on the serial port, and then will echo any characters it receives from the serial port back. When the script is terminated with ^C, the script will close the port.

One easy way to use the script is to connect the Jetson Nano to a PC/Mac/Linux box via a TTL to USB cable. The Jetson Nano signal is 3.3V. Run a serial tty program on the PC to interface with the serial port, and then interact with the Jetson Nano.

The script requires py-serial. To install py-serial:

$ sudo apt-get install python3-serial

Then to run the script:

$ sudo python3 uart_example.py

Initial Release October 2019