تخطَّ إلى المحتوى
TakoAPI
العودة إلى المهارات

dht11-temp

بواسطة noahseeger

Smart Home & IoT
398التنزيلات وفق ما يذكره clawskills.sh
2النجوم
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

شغّل أمر واجهة سطر الأوامر، أو الصق النص في Claude Code أو Cursor أو Codex أو أي وكيل برمجة تستخدمه.

الروابط