---
# System prepended metadata

title: Jetson Nano For Thermal Imager
tags: [Ubuntu, NVIDIA Jetson Nano]

---

Jetson Nano For Thermal Imager
===
> [name=Weiwen Wu][time=2024 01 26]

[toc]

Password
--------

|    Title     |     Account     |    Password    |   Update   | Note |
|:------------:|:---------------:|:--------------:|:----------:|:----:|
|    [Nano]    |       lab       |      3921      | 2024-01-25 |  -   |
| [Teamviewer] |  1 633 302 836  | raspberrry3921 | 2024-01-25 |  -   |
| [VNC] (3913) | 140.127.192.159 |      3921      | 2024-01-30 |  -   |
| [VNC] (3921) | 140.127.192.200 |      3921      | 2024-01-25 |  -   |

[Nano]: https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#write "Jetson Nano 開發者套件入門"
[Teamviewer]: https://www.teamviewer.com/tw/ "Teamviewer"
[VNC]: https://www.realvnc.com/en/connect/download/viewer/ "下載 RealVNC® Viewer"

Application
-----------
Click the title to download.

|    Title     |    Note     |
|:------------:|:-----------:|
|  [VS code]   |    arm64    |
| [teamviewer] | arm64-64bit |

[VS code]: https://code.visualstudio.com/docs/?dv=linuxarm64_deb "下載 VS Code for Linux"
[teamviewer]: https://download.teamviewer.com/download/linux/teamviewer_arm64.deb "下載適用於 Linux 最新版本的 TeamViewer"

Install
-------

### Environment
> **Reference**
> [Nano environment installation](https://d246810g2000.medium.com/nvidia-jetson-nano-for-jetpack-4-4-01-%E7%92%B0%E5%A2%83%E5%AE%89%E8%A3%9D-fd48d5658a13 "NVIDIA Jetson Nano — 01 環境安裝、最詳細燒錄教學")
> [name=張家銘(https://d246810g2000.medium.com/)][time=2020 07 07]
> [Nvidia Jetson Nano user experience](https://hackmd.io/@0p3Xnj8xQ66lEl0EHA_2RQ/Skoa_phvB "Nvidia Jetson Nano 使用心得")
> [name=Kun-Ru Wu(https://hackmd.io/@0p3Xnj8xQ66lEl0EHA_2RQ)][time=2019 12 19]


### Python 3.9
```bash
### Check if the installation is successful. ###
# usr/local/bin
python3.9 --version # python 3.9.0

### switch python version ###
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
```
> **Reference**
> [Install Python 3.9 on Ubuntu 20.04](https://ubunlog.com/zh-TW/python-3-9-como-instalar-en-ubuntu-20-04/ "Python 3.9，如何在Ubuntu 20.04上安裝此版本")
> [name=達米安·A(https://ubunlog.com/zh-TW/%E4%BD%9C%E8%80%85/%E9%81%94%E7%B1%B3%E5%AE%89%C2%B7%E9%98%BF%E8%8E%AB%E5%A4%9A%EF%BC%88Damian-Amoedo%EF%BC%89/)]
> [Switch Python Version](https://github.com/doubleZ0108/Play-with-NVIDIA-Jetson-Nano/blob/master/linux/switch-py-version.md "切換python版本")
> [name=doubleZ0108(https://github.com/doubleZ0108)][time=2021 07 31]



### OpenCV CUDA
```python
# Check if CUDA is currently available.
print(cv2.cuda.getCudaEnabledDeviceCount())
```
> **Reference**
> [Jetson Nano recompiles OpenCV + CUDA](https://maxc-0818.medium.com/jetson-nano-%E9%87%8D%E6%96%B0%E7%B7%A8%E8%AD%AF-opencv-cuda-a65daf5988ab "Jetson Nano 重新編譯 OpenCV + CUDA")
> [name=Max Chang(https://maxc-0818.medium.com/)][time=2021 07 22]

Command
=======
Use a fan
--------

```bash
sudo sh -c 'echo 255 > /sys/devices/pwm-fan/target_pwm' # Make the fan run with PWM speed 255.
```
> **Reference**
> [NVIDIA Jetson Nano Cooling Fan](https://blog.cavedu.com/2019/10/04/nvidia-jetson-nano-fan/ "【教學】NVIDIA® Jetson Nano™ 散熱風扇 使用教學")
> [name=cavedu(https://blog.cavedu.com/)][time=2019 10 04]

Basic
------

```bash
sudo apt-get update  # Latest information and list of updated software.
sudo apt-get upgrade # Update currently installed software to the latest version.
sudo apt autoremove  # Remove dependencies.
sudo nautilus        # Open the file manager with root privileges.
```
> **Reference**
> [Commonly used apt commands (install, update, remove)](https://sean22492249.medium.com/%E5%B8%B8%E7%94%A8%E7%9A%84-apt-%E6%8C%87%E4%BB%A4-%E5%AE%89%E8%A3%9D-%E6%9B%B4%E6%96%B0-%E7%A7%BB%E9%99%A4-cbb56f595568 "常用的 apt 指令 （安裝、更新、移除）")
> [name=Kiwi lee(https://sean22492249.medium.com/)][time=2018 05 24]
> [file manager with root privileges](https://3cschool.blogspot.com/2014/03/rootubuntu.html "如何用root權限開啟檔案管理器？(ubuntu)")
> [name=Eric Shih(https://draft.blogger.com/profile/05139712002614302120)][time=2014 03 09]

Back up system
--------------
```bash
sudo lsblk # Find out the name of the hard drive. (Or use 'sudo fdisk -l')
sudo dd if=/dev/sda conv=sync,noerror | gzip -c > /media/lab3913/Nano2/backup_image.img.gz

### Another terminal executes. ###
sudo pkill -USR1 -n -x dd

### System recovery. ###
gzip -dc /media/lab3913/Nano2/backup_image.img.gz | dd of=/dev/sda
```
> **Reference**
> [Jetson-Nano SD card system backup clone](https://blog.csdn.net/u011119817/article/details/109488332 "【Jetson-Nano】SD卡系統備份克隆")
> [name=牛andmore牛(https://blog.csdn.net/u011119817?type=blog)][time=2020 11 04]
> [Summary of linux commands and detailed explanation of dd command](https://www.cnblogs.com/ginvip/p/6370836.html "linux指令總結及dd指令詳解")
> [name=琴酒網路(https://www.cnblogs.com/ginvip)]
> [How to mount a new hard drive in Linux system](https://linnote.com/how-to-mount-new-disk-linux/ "【超快速教學】Linux系統如何掛載新的硬碟")
> [name=Lin(https://linnote.com/author/yh03172012gmail-com/)][time=2023 05 09]


Example
=======

```python
# test.py
import cv2
class NoCudaError(BaseException):
    def __init__(self, name:str) :
        super().__init__("<{}> cannot get GPU.".format(name))

def  iscuda():
    count = cv2.cuda.getCudaEnabledDeviceCount()
    if count==0:raise NoCudaError("OpenCV")

if __name__=="__main__":
    iscuda()
```

---

> **Reference**
> [HackMD Function Introduction](https://hackmd.io/features-tw?both "Hackmd功能介紹")
> [name=hackmd(https://hackmd.io/c/tutorials-tw/%2Fs%2Ffeatures-tw)]

###### tags: `NVIDIA Jetson Nano` `Ubuntu` `Thermal Imager`

*Copyright © 2024 WeiWen Wu*