yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
Jetson CUBE case📖
0.ReadMenew
  • ReadMe
1.Assembly Tutorial
  • 1.Installation Video
  • 2.Wiring Instructions
2.Drive Tutorials
  • 1. Install CubeNano driver library
  • 2. OLED display
  • 3. Fan drive
  • 4. RGB Light Bar Driver
  • 5. Setting up boot-up
Download
  • Instruction Manual
  • I2C Protocol
  • Code
  • Drive_ORIN_22.04
  • Drive_JetsonNANO_ORIN_20.04
Download ZIP

Welcome to Jetson CUBE case repository

3. Fan drive

 

Fan drive

Fan driveI. Learning ObjectivesII. Pre-lab PreparationIII. Using the CubeNano driver library to control the fan1. Import the CubeNano driver library and create the objects.2. Setting the fan switch3. Code DemoIV. Using Jupyter lab to control the fan1. Import the CubeNano driver library and create objects2. Turn off the fan3. Turn on the fan4. Deletion of objectsV. Experimental phenomena

I. Learning Objectives

  • Master the Jetson Nano series motherboard driver fan
  • Control fans using the CubeNano driver library
  • Control the fan via Jupyter lab

II. Pre-lab Preparation

Follow the assembly video tutorial to install the Jetson CUBE Nano chassis, or refer to the "Jetson CUBE Nano Chassis_Hardware Wiring" tutorial document for installation, here we show the chassis expansion board and RGB light bar and fan hardware connections.

1

Chassis expansion board3 Pin connector2 Pin connector
 RGB light barFan

III. Using the CubeNano driver library to control the fan

1. Import the CubeNano driver library and create the objects.

The name of CubeNano driver library is CubeNanoLib, use CubeNanoLib to import the library in the programme.

xxxxxxxxxx
from CubeNanoLib import CubeNano

The CubeNanoLib library functions needed to control the fan:

xxxxxxxxxx
set_Fan(state) # 设置风扇开关# Setting the fan switch

2. Setting the fan switch

set_Fan(state) : set fan switch
 
state valueFan state
0close
1open
  

3. Code Demo

  • Turning the fan on/off (python interactive interface: each statement needs to be run separately)
xxxxxxxxxx
from CubeNanoLib import CubeNano
bot = CubeNano(i2c_bus=1)
bot.set_Fan(0)
bot.set_Fan(1)
del bot

2

Note: To terminate the run you can press Ctrl + Z

  • turn on the fan (Fan_start.py)

xxxxxxxxxx
from CubeNanoLib import CubeNano
​
if __name__ ==  '__main__':
    bot = CubeNano(i2c_bus=1)
    bot.set_Fan(1)
  • Turn off the fan (Fan_stop.py)

xxxxxxxxxx
from CubeNanoLib import CubeNano
​
if __name__ ==  '__main__':
    bot = CubeNano(i2c_bus=1)
    bot.set_Fan(0)

image-20230717205831540

Note: To terminate the run you can press Ctrl + Z

IV. Using Jupyter lab to control the fan

In the Jupyter lab interface create a new file and create the following code block, edit the following content (Fan_Test.ipynb) respectively:

1. Import the CubeNano driver library and create objects

xxxxxxxxxx
from CubeNanoLib import CubeNano
​
bot = CubeNano(i2c_bus=1)

2. Turn off the fan

xxxxxxxxxx
bot.set_Fan(0)

3. Turn on the fan

xxxxxxxxxx
bot.set_Fan(1)

4. Deletion of objects

xxxxxxxxxx
del bot

image-20230717221917728

  • Jupyter lab basic operation

If you find that the code runs abnormally, it is recommended that you follow the steps in the diagram once and then retest the code block.

image-20230717222058190

V. Experimental phenomena

  • Run the code or file related to opening the fan:

You can see the fan in the chassis box lights up blue and rotates

image-20230717205623851

  • Run the code or file related to shutting down the fan:

You can see that the blue light of the fan inside the chassis box goes out and stops spinning.

image-20230717205323442

OLED display
RGB Light Bar Driver

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文