跳到正文
TakoAPI
返回技能列表

dht11-temp

由 noahseeger 提供

Smart Home & IoT
398下载量由 clawskills.sh 提供
2星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Read temperature and humidity from DHT11 sensor.

描述

该技能的功能

Reads temperature and humidity from a DHT11 sensor connected to a Raspberry Pi. The GPIO pin is configurable via CLI argument or environment variable, defaulting to pin 19.

Supports both CLI argument and environment variable pin configuration, making it easy to use in automated scripts without editing code.

何时使用

  • Logging greenhouse temperature every 30 minutes via cron
  • Monitoring humidity in a server room or basement
  • Building a home weather station with a Pi
  • Alerting when humidity exceeds a threshold in a script
  • Capturing sensor data to a file for later analysis

示例工作流

输入

User asks: read the current temperature and humidity from the DHT11 on GPIO 4

智能体
  1. 1

    Sets DHT_PIN=4 or passes 4 as a CLI argument

  2. 2

    Runs sudo python3 scripts/dht/main.py 4

  3. 3

    Captures stdout output

  4. 4

    Parses line 1 as temperature in Celsius and line 2 as humidity percentage

输出

Temperature: 22.5°C, Humidity: 58%

前置要求

  • Raspberry Pi with GPIO pins
  • DHT11 sensor and 10K pull-up resistor (hardware)
  • RPi.GPIO Python package (pip3 install RPi.GPIO)

安装

clawhub install noahseeger/dht11-temp

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接