​DHT11 Sensor With OLED Part 1 (Temperature)

by Aced Inventor in Circuits > Arduino

2125 Views, 9 Favorites, 0 Comments

​DHT11 Sensor With OLED Part 1 (Temperature)

DHT11 Temperature Sensor with OLED (Part 1) | Arduino

In this project, we will be making a "DHT11 Sensor with OLED." We write some code, so the Arduino can receive the temperature from the sensor. Once we have the temperature, we convert it to Fahrenheit ((Celcius * 1.8) + 32). We then customize the OLED screen to display the temperature in Celsius & Fahrenheit. There is a thermometer animation on the right side of the screen, which moves up and down based on the temperature.

This project can still be improved.

Supplies

Commponents.png

DHT11 Wiring

DHT11 Wiring.png

Connect the DHT11 as following:

Arduino >> DHT11

GND >> GND

5V >> VCC

A0 >> Signal

OLED Wiring

Wiring Full.png

Connect the OLED as following:

Arduino >> OLED

GND >> GND

5V >> VCC

A4 >> SDA

A5 >> SCL

Uploading the Program

programming.png

Open the program on Arduino IDE. Once it is open, compile the sketch to see if it is clear of error and upload it. Make sure you have all the libraries download before you upload the program. After you have uploaded the program, you should see the screen turn on and display the temperature in Celsius and Fahrenheit.

I am using the "FreeSerifItalic9pt7b" and "FreeMonoBold9pt7b" font but you can go to Adafruit's website if you want to use a different font. You will have to make some small changes to the code after you add the new font.

For more information about this, please visit my Patreon:

https://www.patreon.com/acedinventor

Testing the Project

testing the project.png

To test if the project is working properly, check the temperature the DHT11 is displaying on the OLED screen and check the thermometer in your house and see if they match. If they don't there could be a possibility that the room the sensor is in is warmer or colder which is why the temperatures are not matching. You can also test the sensor by putting a piece of ice on it and see if the temperate is dropping.

If there is still something you don't understand, you can comment down below.