DHT22 & 0.96 OLED Display

Introduction: DHT22 & 0.96 OLED Display

I know there are lots of Instructables showing how to use a DHT22 and a 0.96 OLED display but I thought I'd show how I made mine!

Step 1: Required Components

For this Instructable I'm using the following easily available parts:

Arduino Uno or compatible

DHT22 sensor

0.96 OLED display

Breadboard and jumper wires.

Step 2: Connecting It All Together

Connect the parts as follows:

DHT22 pin1 to Arduino 5v

DHT22 pin2 to Arduino pin2

DHT22 pin3 to Arduino Ground (GND)

OLED GND to Arduino Ground (GND)

OLED VDD to Arduino 5v

OLED SCK to Arduino D5

OLED SDA to Arduino D4

Step 3: The Code

This is the code I used to get the readings from the DHT22 and display them on the 0.96 OLED.

I used the U8G2 display library as I wanted a bit more control over the text size and fonts used.

2 People Made This Project!


  • Raspberry Pi Contest

    Raspberry Pi Contest
  • One Board Contest

    One Board Contest
  • Fix It Speed Challenge

    Fix It Speed Challenge



4 months ago

me aparece error en la pantalla
t=nan *c
h=nan % .
como puedo corregirlo


Tip 8 months ago

OLED D4 = A4
OLED D5 = A5
then it works great


3 years ago

Seriously, THANK you for sharing. This Instructable really helped me understand some of the coding aspects i wasn't getting through my thick skull.
One thing i am still having trouble figuring out though, is how to convert the Temp to Fahrenheit...?
Any tips or clues would be really appreciated. Thanks again.

DIY Hacks and How Tos

Great first Instructable. Thanks for sharing with the community.