Welcome to Jetson ORIN NANO SUPER repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
4. Temperature and Humidity Sensor
OpenClaw Temperature and Humidity Acquisition Tutorial
Before starting, please complete the [01-Hardware Configuration], [02-openclaw API-KEY Configuration], [03-openclaw Model Switching], [04-AI Voice Interaction Configuration], [05-Three Dialogue Solution Configuration Tests] under the
Prerequisitesdirectory. If you are currently only using TUI / whatsapp, you can skip04for now. This article assumes the basic environment has been prepared and only expands on DHT-related content.
1. Tutorial Objectives
This article demonstrates OpenClaw's natural language control capabilities through the DHT temperature and humidity sensor. After completing this tutorial, readers can:
Understand the basic approach to reading temperature and humidity with OpenClaw
Communicate with OpenClaw through three methods: whatsapp, TUI, and voice code
Complete four DHT cases: single reading, comfort judgment, threshold alert, OLED linked display
Understand the complete chain from "user question" to "sensor reading" and "result feedback"
2. Hardware Preparation
OpenClaw mainboard
DHT temperature and humidity sensor
[Default DHT11][Optional] OLED display[Optional] Microphone moduleWiring diagram

3. Software Preparation
Code entry points that will be used in the tutorial
Low-level driver code:
/home/jetson/hardware_hal_demo/Temperature and humidity reading command:
/home/jetson/hardware_hal_demo/dhtTemperature and humidity linked display:
/home/jetson/hardware_hal_demo/dht_oledVoice entry:
/home/jetson/voice_to_openclaw/src/main.py
The dht tool already supports the following capabilities:
Read current temperature and humidity
Output results in
jsonortextformatUse
mockfake data for local debugging
dht_oled #Display temperature and humidity data to OLEDdht #Feedback `json` resultsIf you want to display temperature and humidity results directly to OLED, you can also use dht_oled.
Note: If you want to write the tutorial yourself to read temperature and humidity data from the ajetson in the Python driver library, it is recommended to read DHT data at 2-second intervals, because DHT sensor itself is more suitable for 2s sampling
4. Test Temperature and Humidity Acquisition
Before starting this tutorial, please complete one openclaw tui basic dialogue self-check; if you haven't done it yet, see [05-Three Dialogue Solution Configuration Tests]. After confirming OpenClaw can respond normally, enter DHT-specific testing.
Terminal input to enter TUI:
xxxxxxxxxxopenclaw tui
You can try entering the following content in the terminal:
Read current temperature and humidity
What is the current environmental humidity
Help me judge if the current environment is comfortable
Remind me if the temperature is too high

5. Three Solutions for Communicating with OpenClaw
| Solution | Suitable Scenarios | Advantages | Recommended Positioning |
|---|---|---|---|
| Remote control, classroom demonstrations | Easy to connect, suitable for multi-person experience | Demonstrate "remote natural language control" | |
| TUI | Local debugging, command verification | Most direct, easiest to troubleshoot | First run through the control chain |
| Voice code | Voice interaction, complete AI experience | Closest to real conversation experience | As final demonstration solution |
If optional AI voice module + speaker are selected, whatsapp dialogue, tui, whatsapp dialogue need to broadcast OpenClaw's reply content. You can run the following program in terminal. AI voice module dialogue does not need to run repeatedly
Modify whether to enable broadcast parameter
xxxxxxxxxx/home/jetson/voice_to_openclaw/.env
xxxxxxxxxxENABLE_TTS=true #This parameter controls whether to broadcast. After modification and saving, run the following program in terminalTerminal input
xxxxxxxxxxcd ~/voice_to_openclawsource .venv/bin/activatepython -m src.openclaw_session_tts
5.1 whatsapp Solution
For whatsapp connection steps, please directly refer to [05-Three Dialogue Solution Configuration Tests]. This section only retains dialogue examples suitable for the DHT tutorial.
After creation, you can directly dialogue, for example:
Read current temperature and humidity
Judge if it's currently too hot
Remind me if humidity is too low

5.2 TUI Solution
If you have completed the TUI self-check in Chapter 0, directly enter the following command in the terminal to continue the dialogue:
xxxxxxxxxxopenclaw tui
5.3 Voice Code Solution
xxxxxxxxxxRequires optional AI voice interaction module + speaker
For voice module installation, environment configuration, and basic wake-up process, please directly refer to [04-AI Voice Interaction Configuration].
You need to say "Hi, yahboom" to wake up for dialogue.
After waking up, you can directly say control content, for example:
What is the current temperature
Help me read the humidity
Tell me if it's too stuffy

6. Comprehensive Cases
Note: The following are all dialogue demonstrations using openclaw tui method. You can also choose whatsapp or voice method to complete.
6.1 Case One: Single Reading
Experimental Objective
Get current temperature and humidity once to complete the most basic environmental sampling.
Effect Description
After receiving the command, OpenClaw will call the DHT driver to read the current temperature and humidity, and return the results to the user in natural language.
Example Instructions
Read current temperature and humidity
What is the current indoor temperature
Help me check the current humidity
6.2 Case Two: Comfort Judgment
Experimental Objective
Let OpenClaw make a simple judgment about the current environment after reading data.
Effect Description
Besides directly reporting numbers, OpenClaw can also roughly judge states like "too hot", "too cold", "too dry", "too stuffy" based on temperature and humidity, making results closer to natural dialogue.
Example Instructions
Help me judge if the current environment is comfortable
Is the current temperature and humidity suitable for long-term office work
Give me a brief evaluation based on temperature and humidity
6.3 Case Three: Threshold Alert
Experimental Objective
Let OpenClaw give alerts when temperature or humidity exceeds the set range.
Effect Description
When temperature is too high, too low, or humidity is too high or too low, OpenClaw can directly output alert information, or link with RGB lights for more obvious feedback.
Example Instructions
Remind me if temperature exceeds 30 degrees
Prompt if humidity is below 40% that air is too dry
Are there any alarm conditions now
Extensible Gameplay
Link with RGB for red, yellow, blue three-color alerts
Link with OLED to display alarm text
Add buzzer for stronger alerts
6.4 Case Four: OLED Linked Display
Experimental Objective
Display the temperature and humidity results just read directly to OLED, forming a complete data display chain.
Effect Description
After completing an environmental sampling, OpenClaw can not only return results to the user, but also simultaneously write temperature and humidity to the OLED screen, forming a complete effect of "reading + display".
Example Instructions
Read current temperature and humidity and display to OLED
Write temperature and humidity to the screen
Make a simple temperature and humidity display page
Extensible Gameplay
Periodically refresh OLED content
Make into a temperature and humidity dashboard
Link with weather station project to form a complete application