Professional Documents
Culture Documents
ON BOARD COMPUTER
JETSON – NANO
• The board consists of a CPU with 1.43 GHz and a GPU with 128
cores of the Maxwell generation.
• We can say the NVIDIA Jetson Nano is a computer of small size. Since
NVIDIA Jetson Nano is a computer, we can treat it as an everyday
computer.
• We can browse the internet to look for information.
• We also can use it for daily computer activities such as writing documents, creating spreadsheets, and
printing documents.
• We can install office applications from LibreOffice.
JETSON NANO
Compact AI Compute Module
6
JETSON NANO SPECIFICATIONS
JETSON NANO COMPUTE MODULE
PROCESSOR INTERFACES
Video Decoder 4Kp60 | (2x) 4Kp30 | (8x) 1080p30 | (4x) 1080p60 Size 45x70mm, 260-pin SODIMM connector
Production module
available June 2019
7
Variants
Technically, both models have the same CPU and GPU, but some
peripherals are changed.
Jetson NANO Bootflow
Like most advanced CPUs a lot of work happens behind the scenes before
you get the usual GRUB or U-boot prompt. While the high performance 64bit
Arm cores (Known in NVIDIA terms as the CPU Complex or CCPLEX) are the
main elements there is in-fact another, smaller ARM core sitting right at the
heart of the system. Known as the BPMP (Boot
and Power Management Processor). It even has it’s own 256kbytes of ram
inside the CPU die.
When power is applied it is the BPMP that wakes up and executes the initial
boot code stored in the onboard iROM (BootROM). In a secure environment,
it’s main purpose at this point is to validate and initialise all the low level
system functions. These are things like basic clocks, internal power rails and
the the boot media (SD, SPI etc) and then to parse the Boot Configuration
Table (BCT) looking for a valid boot configuration. The current Jetson Nano
development systems store the BCT and the boot binaries inside SPI (4MByte
capacity) when using SD as the boot medium, although previous versions
used separate partitions in the boot medium for them.
If a valid BCT is found it will load the TegraBoot binary and transfer to that
running in a non-secure enviroment. It is at this point you normally see
console output on the debugging serial port.
TegraBoot has different binaries, one for the cold boot path and one for the
warm boot. Reset or power on is defined as a “cold” boot, with a “warm”
boot being resumption from a suspended state. A warm boot would perform
a different set of configurations and is not discussed here.
The u-boot binary image is finally read and control is passed to it. At this
point the boot process continues pretty much like every other other
embedded system.
Jetson Nano
SBC Raspberry Pi 4B
The NVIDIA Jetson Nano device image is built from Ubuntu Linux. To build
programs on the NVIDIA Jetson Nano device, we should consider all program
constraints of a Linux-based platform.
• Editor tools
• C/C++ programs
• Python programs
• Node.js programs
Editor Tools
To write programs on the NVIDIA Jetson Nano device, you need a text editor.
You can use an official editor from the Ubuntu desktop, such as gedit. However, you also
can use vi and nano to write code
C/C++
You can build programs for C/C++ on your NVIDIA Jetson Nano.
The NVIDIA Jetson Nano image includes GCC compiler, so you can use that for compiling
C/C++. To verify your GCC version, open Terminal and type this command:
gcc --version
There are various Python libraries that provide hardware drive interfaces.
jupyter notebook
When working on data processing or data science, most developers use Jupyter Notebook to
write and run Python scripts.
You can install Jupyter Notebook on your NVIDIA Jetson Nano. Open Terminal and then type
these commands:
To install Node.js on your NVIDIA Jetson Nano device, you can type this command:
sudo apt-get install nodejs npm
NVIDIA Jetson Nano I/O Programming
Both the A02 and B01 models of the NVIDIA Jetson Nano have
GPIO pins on the J41 header. We can thus extend some sensors
and actuators into NVIDIA Jetson Nano devices. NVIDIA Jetson
Nano also provides GPIO pins for UART, PWM, SPI, I2S, and I2C
Setting up GPIO
• GPIO programming
• Sensor programming
• Actuator programming
GPIO Programming
The NVIDIA Jetson Nano board has forty GPIO pins. You can use a GPIO pin in either input
mode or output mode.
try:
while 1:
print("turn on led")
GPIO.output(led_pin, GPIO.HIGH)
time.sleep(2)
print("turn off led")
GPIO.output(led_pin, GPIO.LOW)
time.sleep(2)
Sensor Programming
You can attach various sensor modules to the NVIDIA Jetson Nano, but not all sensor
interfaces are supported by it.
You can use the following supported interface protocols on the NVIDIA Jetson Nano:
• Digital I/O
• UART (Serial Communication)
• SPI (Serial Peripheral Interface)
• I2C (Inter-Integrated Circuit)
• I2S (Inter-IC Sound Bus)
NVIDIA Jetson Nano Camera
We can use a camera with the NVIDIA Jetson Nano board.
Then, we can make a smart device-based NVIDIA Jetson
Nano
import numpy as np
import cv2
cap = cv2.VideoCapture(1)
while(True):
ret, frame = cap.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.imshow('frame',gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
Taking a Picture with Camera USB
To take a picture from the camera USB, you can use the cv2.imwrite() function to save a
video frame into a file.
import numpy as np
import cv2
cap = cv2.VideoCapture(1)
while(True):
ret, frame = cap.read()
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
cv2.imwrite('mypicture.png',frame)
break
cap.release()
cv2.destroyAllWindows()
RECORDING A VIDEO
import numpy as np
import cv2
cap = cv2.VideoCapture(1)
w=int(cap.get(cv2.CAP_PROP_FRAME_WIDTH ))
h=int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT ))
fourcc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter('output.avi',fourcc, 20.0, (w,h))
while(cap.isOpened()):
ret, frame = cap.read()
if ret==True:
out.write(frame)
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
else:
break
cap.release()
out.release()
cv2.destroyAllWindows()
THE JETSON FAMILY
From AI at the Edge to Autonomous Machines
JETSON NANO JETSON TX1 JETSON TX2 4GB JETSON TX2 8GB | Industrial JETSON AGX XAVIER
5—10W 7—15W 7—15W 10—30W
0.5 TFLOPS (FP16) 1—1.3 TFLOPS (FP16) 1.3 TFLOPS (FP16) 11 TFLOPS (FP16) | 32 TOPS (INT8)
45mm x 70mm 50mm x 87mm 50mm x 87mm 100mm x 87mm
$129 / $99 (Devkit) $299 $399—$749 $1099
9
developer.nvidia.com/jetpack
JETSON POWERS AUTONOMOUS MACHINES
WAREHOUSE DELIVERY AGRICULTURE RETAI INDUSTRIAL
L
3
Application - NETWORK VIDEO RECORDER
16
JETBOT
~$250 DIY Autonomous Deep Learning Robotics Kit
github.com/NVIDIA-AI-IOT/JetBot 29
USING GPIO
J41 Expansion Header
sysfs GPIO Name Pin Pin Name sysfs GPIO
3.3V 1 2 5.0V
I2C_2_SDA 3 4 5.0V
I2C_2_SCL 5 6 GND
gpio216 AUDIO_MCLK 7 8 UART_2_TX
GND 9 10 UART_2_RX
gpio50 UART_2_RTS 11 12 I2S_4_SCLK gpio79
gpio14 SPI_2_SCK 13 14 GND
gpio194 LCD_TE 15 16 SPI_2_CS1 gpio232
3.3V 17 18 SPI_2_CS0 gpio15
gpio16 SPI_1_MOSI 19 20 GND
gpio17 SPI_1_MISO 21 22 SPI_2_MISO gpio13
gpio18 SPI_1_SCK 23 24 SPI_1_CS0 gpio19
GND 25 26 SPI_1_CS1 gpio20
I2C_1_SDA 27 28 I2C_1_SCL
gpio149 CAM_AF_EN 29 30 GND
gpio200 GPIO_PZ0 31 32 LCD_BL_PWM gpio168
gpio38 GPIO_PE6 33 34 GND
gpio76 I2S_4_LRCK 35 36 UART_2_CTS gpio51
gpio12 SPI_2_MOSI 37 38 I2S_4_SDIN gpio77
GND 39 40 I2S_4_SDOUT gpio78
35
HELLO AI WORLD
Getting Started with Deep Learning
Pretrained NVIDIA Jetson Realtime
Networks JetPack | TensorRT Inferencing
github.com/dusty-nv/jetson-inference
HELLO AI WORLD
Getting Started with Deep
Learning
1. Download and Build the GitHub Repo
git clone http://github.com/dusty-nv/jetson-inference
github.com/dusty-nv/jetson-inference
22
HELLO AI WORLD
Getting Started with Deep
Learning
1. Download and Build the GitHub Repo
github.com/dusty-nv/jetson-inference
23
HELLO AI WORLD
Getting Started with Deep
Learning
1. Download and Build the GitHub Repo #include <jetson-inference/imageNet.h>
#include <jetson-utils/loadImage.h>
github.com/dusty-nv/jetson-inference
25
HELLO AI WORLD
Getting Started with Deep
Learning
1. Download and Build the GitHub Repo
github.com/dusty-nv/jetson-inference
26
HELLO AI WORLD
Getting Started with Deep
Learning
1. Download and Build the GitHub Repo