In this tutorial I'll describe how to use a DHT sensor on an Arduino Nano and OLED display.
Step 1: Intro
My name is Nick Hendriks and I live in the Netherlands. I have no experience with Arduino or the components used, but with reading a lot of tutorials I came to this little project I wanted to set up.
I have this DHT11 temperature/humidity sensor and an OLED display. A while ago I ordered a C-control WiFi board, wich is basically an Arduino NANO V3 with integrated ESP8266 WiFI module.
For the experienced ones, this should be easy, for me, it was a kind of challenge.
So follow these steps to build your own temperature/humidity display.
Step 2: Components
For the microcontroller, I use C-control Wifi Board (or Pretzelboard), wich is an Arduino Nano V3 with an ESP8266 Wifi module integrated.
The sensor I use, is a DHT11 temperature/humidity sensor. You can also use a DHT22 sensor, wich is more precize, but I'll come back to that later.
The OLED display I use is a Heltec display. After a lot of research i found out it works like an Adafruit 128x64 SPI OLED display based on a SSD1306 chip, so my drawing will use the Adafruit one.
Fit this onto a breadboard and follow the next step for wiring.
Step 3: Wiring
Check out the Fritzing image for the wiring.
OLED display wiring:
Display / Arduino
GND / GND
Vin / 3.3v (in my case, when using Adafruit connect it to 5V)
Data (mosi) / D9
CLK / D10
D/C / D11
RST / D13
CS / D12
VCC / 3.3v
Data / D2 on Arduino Nano
GND / GND
Step 4: Software
The script can be modified to display your own startup message, aswell the use of the sensor type. When your sensor is broken or not connected, it will display a message on startup. Don't leave this running for hours, or the text will burn into the OLED!
In this script I use the DHT11 sensor.
Load this directly into your nano when using an Adafruit SPI 128x64 OLED and a DHT11 sensor. Or edit to your needs (when using a different display, check the Adafruit tutorial.)
Step 5: Firing Up
When the script is loaded, you should see a little dot in your display after a few seconds, followed by your welcome text and then the loading screen. When the sensor isn't working or when it's disconnected, it gives you a error message.
When everything is fine, it'll show you the current temperature and humidity levels. Auto refresh every 1 second.
Step 6: The End
Thank you for reading this tutorial. As I said, I'm a beginner at this, so input is appreciated! I'm learning more and more everyday.