################## Jetson Nano Wiki ################## Getting Started =============== **Hardware Required:** .. image:: extra/hardware-requirements-1.jpg :align: center .. image:: extra/hardware-requirement-2.jpg :align: center Flashing the image ------------------- You can flash the image using either: 1) Commandline 2) GUI Using commandline ~~~~~~~~~~~~~~~~~~ .. code-block:: shell unzip JetsonNano-shunya-xxxx-image-0.1.zip cd JetsonNano-shunya-xxxx-image-0.1 .. note:: Please replace xxxx with desktop or console dependending on the image you downloaded **If you are using a built in Memory card reader then use the command below:** .. code-block:: shell sudo dd if=shunya-xxxx-image-jetson-nano.img of=/dev/mmcblk0 status=progress **OR** If you are using a USB SD-Card adapter use the command below: .. code-block:: shell sudo dd if=shunya-xxxx-image-jetson-nano.img of=/dev/sdx status=progress .. note:: Please replace x in /dev/sdx with your device(eg /dev/sdb) Using GUI ~~~~~~~~~~ - **Step 1:Right click on the zip file downloaded and select Extract here** - **Step 2:Once the image is unzipped double click on the unzipped image folder in which you will find the image and release info** - **Step 3:Right click on the image** - **Step 4:Select Open with -> Disk image writer** - **Step 5:Choose Destination as SD Card Reader** - **Step 6:Enter your password** Networking =========== **Network Devices available:** - Ethernet Using a Camera on Jetson-Nano ============================== Using GStreamer --------------- **To record a video in the avi format use the following command** .. code-block:: shell gst-launch-1.0 v4l2src ! avimux ! filesink location=filename.avi -e **To record a video in the mkv format use the following command** .. code-block:: shell gst-launch-1.0 -e v4l2src ! videoconvert ! matroskamux ! filesink location=filename.mkv .. note:: Device number might change so be careful. Using FFMPEG ------------- To install ffmpeg use the following command: .. code-block:: shell sudo apt install ffmpeg **To check the index of the USB use v4l-utils.You can install it and get the index using the commands below:** .. code-block:: shell sudo apt install v4l-utils v4l2-ctl --list-devices **To record a video using ffmpeg the following command can be used:** .. code-block:: shell ffmpeg -i /dev/video0 filename.avi **OR** .. code-block:: shell ffmpeg -f v4l2 -video_size 640x480 -i /dev/video0 -c:v libx264 filename.mp4 Sound on Jetson-Nano ===================== Sound recording and playback is tested using a USB Mic and a Speaker connected to USB Sound Adapter. .. note:: Device and card numbers might change so be careful. Sound Recording --------------- To list the recording devices you can use this command: .. code-block:: shell arecord -l To record a wav file you can use the following command: .. code-block:: shell arecord -vv -Dplughw:2,0 -f dat filename.wav Sound Playback -------------- To list the playback devices use this command: .. code-block:: shell aplay -l To playback a wav file from the Speaker connect to USB Sound Adapter use the following command: .. code-block:: shell aplay -vv --device=hw:2,0 filename.wav OpenCV on Jetson-Nano ====================== Install **OpenCV-3.3** ---------------------- .. code-block:: shell sudo opkg install python3-opencv Test **OpenCV-3.3** ------------------- .. code-block:: shell :linenos: sudo opkg install git git clone https://github.com/shunyaos/object-recognition-dnn.git cd object-recognition-dnn python3 detect.py Test Outcome ------------- .. image:: extra/jetson-nano-test-opencv.png :align: center Resize Rootfs-Partition of Jetson-Nano ======================================= **If you want to resize the image use the commands given below** .. code-block:: shell :linenos: $ sudo parted /dev/mmcblk0 (parted) resizepart 1 Warning: Partition /dev/mmcblk0p1 is being used. Are you sure you want to continue? Yes/No? Yes End? [2147MB]? -34s (parted) quit $ sudo partprobe $ sudo resize2fs /dev/mmcblk0p1 Release info ============ **Shunya O/s Version: 0.1-Beta** **Kernel Version: 4.9.140** **Bootloader: U-BOOT** **Bootloader Version:2016.07** **Desktop Environment (if applicable): XFCE**