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.
6 Comments
1 year ago
I made it! Thanks for sharing the code.
1 year ago
me aparece error en la pantalla
t=nan *c
h=nan % .
como puedo corregirlo
Tip 2 years ago
OLED D4 = A4
OLED D5 = A5
then it works great
4 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.
Reply 4 years ago
Thank you for your comment, I'm glad my Instructable was able to help you.
To be honest, I don't know how to to convert to Fahrenheit. Have a look at this Instructable to see if it is of any help - https://www.instructables.com/id/Arduino-and-DHT22-AM2302-Temperature-Measurement/
5 years ago
Great first Instructable. Thanks for sharing with the community.