DHT11 Sensor Suhu Dan Kelembaban

Persiapan Perangkat #

– Raspberry Pi Pico / Pico W
– HC SR501 Pir Motion Sensor
– Breadboard
– 3x Kabel Jumper Male to Female
– Kabel Micro USD
– Aplikasi Thonny IDE

Wiring DHT11 Ke Raspberry Pi PICO #

– connect the DATA pin of the sensor to GP16 (yellow wire)
– connect the VCC pin of the sensor to 3V3(OUT) (red wire)
– connect the GND of the sensor to a GND of the Pico (black wire)

Sample Code #

from machine import Pin
import time
from dht import DHT11, InvalidChecksum
sensor = DHT11(Pin(16, Pin.OUT, Pin.PULL_DOWN))
while True:
    temp = sensor.temperature
    humidity = sensor.humidity
    print("Temperature: {}°C   Humidity: {:.0f}% ".format(temp, humidity))

Hasil Yang Di Tampikan:

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar
What are you looking for in Partdo?
× How can I help you?