Jetson nano Tutorial
Last revision 2025/12/29
This Jetson Nano Tutorial offers a detailed guide on installing libraries, downloading programs, and running basic demos to enhance device functionality, aimed at helping beginners understand and utilize Jetson Nano effectively.
Tutorial Based on Jetson Nano
Install Library
Install the function library
- Open the end interface, and input the following commands to install the library.
command1: sudo apt-get update
command2: sudo apt-get install python3-pip
command3: sudo pip3 install Jetson.GPIO
command4: sudo groupadd -f -r gpio
command5: sudo usermod -a -G gpio your_user_name
command6: sudo cp /opt/nvidia/jetson-gpio/etc/99-gpio.rules /etc/udev/rules.d/
command7: sudo udevadm control --reload-rules && sudo udevadm trigger
Note: your_user_name is your user name, like Tom.
- Install I2C
command1: sudo apt-get install python-smbus
- Install Image Processing Library
command1: sudo apt-get install python3-pil
command2: sudo apt-get install python3-numpy
Download Program
command1: sudo apt-get install p7zip
command2: wget http://www.waveshare.net/w/upload/9/96/Pan-Tilt_HAT_code.7z
command3: 7zr x Pan-Tilt_HAT_code.7z -r -o./Pan-Tilt_HAT_code
command4: sudo chmod 777 -R Pan-Tilt_HAT_code
command5: cd Pan-Tilt\ HAT_Code/Pan-Tilt\ HAT/
Also you can download from the Github:
command1: sudo git clone https://github.com/waveshare/Pan-Tilt-HAT
command2: cd Pan-Tilt-HAT/JetsonNano/
Basic Demo
Execute this if using ambient light
command1: cd 1_Light_Sensor/
Execute this if using pan servo
command2: cd 2_Servo_Driver/
-
Python Program
-
python2
command1:cd python2
command2:sudo python main.py -
python3
command1:cd python3
command2:sudo python3 main.py -
Test the Camera
command: DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc ! \'video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)NV12, framerate=(fraction)30/1\' ! nvoverlaysink -e
If everything works fine, the data captured by the camera will be displayed on the screen. Press Ctrl+C to stop.
Control the pan module.
Run at the end:
command1: cd 3_Pan-Tilt+CAM
command2: sudo python main.py

Data capatured by the camera is displayed on the screen in real-time.

Was this article helpful?
