Humidity and Temperature Sensor

Project made b IDREES ALHASSAN - 1221EA

Introduction

In this project, we will use the Arduino DHT11 Temperature/Humidity sensor and display on Oled . Humidity and Temperature Sensor is a device that aims to determine the temperature and humidity level in the room in which it is left .

General Description

The device is quite simplistic in terms of components, but also in terms of programming knowledge. It consists of a DHT11 temperature and humidity sensor, easily reads the essential information, displaying it on a display, connected to the Arduino board. The LEDs mounted on the breadboard are intended to display the temperature in the room in a different way.

Hardware Design

Here's all about hardware design: Components

  • Arduino Uno
  • Sensor Temperature and Humidity DHT11
  • Oled 0.91 inch

Wiring diagram :

Software Design

For the realization of this project we used as development medium the Arduino IDE program, in which we selected from the Tools menu the motherboard used. Also, to make the connection between the board and the OLED display, I imported from the internet the library “Adafruit_SSD1306.h”, and for the correct use of the DHT11 temperature and humidity sensor I included the libraries “DHT” and “Wire”.

In terms of complexity, the code is relatively simple, consisting of two functions (“setup” and “loop”). Before implementing the two functions, i used the OLED display, also the humidity sensor.

In the “Setup” function, for the beginning,I started the display. To display the text, first I selected the lines on which I want the text to be written and then I printed it. in order not to have a text overlapping with the information provided by the device, I reset the display and turn on the sensor (begin () function).

The “Loop” function is the function where the whole process of determining the temperature and humidity takes place. In this function, the first step I took was to declare two variables (humidity and temperature) that read the values ​​in the sensor. The readTemperature () function has a false value as a parameter because I decided to display the temperature in degrees Celsius. If the value was true, it was displayed in degrees Fahrenheit on the screen.

Knowing that the maximum temperature that the DHT11 sensor can read in 50 degrees Celsius.

For the display I used the same method as in the “Setup” function.

Results Obtained

What were the results of your project?

Download

pm/prj2022/apredescu/humidity_and_temperature_sensor.txt · Last modified: 2022/06/02 02:11 by alhassan.idrees
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0