Introduction: ​DHT11 Sensor With OLED Part 1 (Temperature)

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.

Step 1: Supplies

Step 2: DHT11 Wiring

Connect the DHT11 as following:

Arduino >> DHT11

GND >> GND

5V >> VCC

A0 >> Signal

Step 3: OLED Wiring

Connect the OLED as following:

Arduino >> OLED

GND >> GND

5V >> VCC

A4 >> SDA

A5 >> SCL

Step 4: Uploading the Program

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

Step 5: Testing the Project

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.