DHT11 Sensor With OLED Part 2 (Temperature & Humidity)
by Aced Inventor in Circuits > Arduino
1542 Views, 4 Favorites, 0 Comments
DHT11 Sensor With OLED Part 2 (Temperature & Humidity)
In this project, we will be making a "DHT11 Sensor with OLED." In part 1, we display the temperature in Celsius and Fahrenheit with a thermometer animation. In this part, we will be removing the thermometer animation and adding the humidity value. We write some code so that the Arduino can receive the temperature and humidity 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. The value of the Humidity is displayed in percentage on the right side of the OLED.
This project can still be improved.
Supplies
The components required to make this project are:
DHT11 Wiring
Connect the DHT11 as following:
Arduino >> DHT11
GND >> GND
5V >> VCC
A0 >> Signal
OLED Wiring
Connect the OLED as following:
Arduino >> OLED
GND >> GND
5V >> VCC
A4 >> SDA
A5 >> SCL
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 "Aced Inventor." After 2 seconds it will then display the temperature in Celsius, Fahrenheit, and Humidity. You will also have to download the .zip OLED_I2c library.
For more information about this, please visit my Patreon:
https://www.patreon.com/acedinventor
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. To test the humidity, you can blow on the sensor, and the humidity should rise. You can also test the humidity by checking your house's humidity via some other reliable humidity checker.
If there is still something you don't understand, you can comment down below.