Skip to content

asathiskumar98-byte/Raspberry-Pi-Pico-W-DHT22-Temperature-Humidity-Sensor-MicroPython-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

🌤 Raspberry Pi Pico W – DHT22 Temperature & Humidity Sensor (MicroPython)

Reads temperature (°C) and humidity (%) values using a DHT22 sensor and displays them over the serial console.


⚙️ Hardware Setup

DHT22 Pin Pico W Pin Description
VCC 3.3V Power
DATA GPIO16 Sensor Data
GND GND Ground
(Optional) 10kΩ resistor between VCC and DATA Pull-up for stable readings

🧠 Working Principle

The DHT22 is a digital sensor that measures:

  • Temperature (range: -40°C to +80°C)
  • Humidity (range: 0% to 100%)

The Pico W communicates using single-wire timing via MicroPython’s dht module.


🚀 Run Steps

  1. Flash MicroPython firmware to your Pico W
  2. Open Thonny IDE → select MicroPython (Raspberry Pi Pico)
  3. Save the code as main.py on the Pico W
  4. Open the Shell window → View live sensor readings every 2 seconds

💡 Future Upgrades

  • Display readings on SSD1306 OLED
  • Send data over Wi-Fi to a web dashboard
  • Log data to an SD card

About

Reads temperature (°C) and humidity (%) values using a **DHT22 sensor** and displays them over the serial console.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages