In the class yesterday, we discussed about using Arduino with a temperature sensor, this made us venture into the topic called thermocouple. Although, thermocouple cannot be used with an arduino but it is an example of an instrument used to measure great heat.
The class discussed about two equipment that can be used with an Arduino to measure temperature which include the Lm35 and the DHT11/22. One of the major differences between the LM35 and the DHT11/22 is that one is Analog while the other is Digital reading. The LM35 can only be used to measure temperature while the DHT11//22 can be used to measure both temperature and humidity.
In the class, we had a DHT11 sensor present to be used with an Arduino while the LM35 was not available to be used. In the picture below you have me holding the DHT11 sensor on my hand.
While in the image, you see the image of the LM35 sensor on the display screen of my system.
While I was in class yesterday, the instructor was discussing about the sensor to us, so I used the opportunity to take a picture.
USING THE DHT11 SENSOR WITH ARDUINO
To be able to use this sensor with Arduino, it is important one must have the sensor library added in the Arduino. To download a DHT sensor library, there are two ways to do that which I would be discussing below.
1. DOWNLOAD FOR ARDUINO WEBSITE HERE
If you click on the link above, you would find different versions of the DHT library, you can select any version then install the zip file. After the file has been installed, you would have to open your Arduino Software application. You can check mine in the image below.
- Click Sketch
- Then click include library
- Then click Add Zip library
- Then search for DHT SENSOR LIBRARY AND UPLOAD
After uploading the library you can input your code into the Arduino. You begin by following the earlier process, clicking on sketch, included library and then click on DHT_sensor_library.
Below is the image of the code we used for the Arduino.
Luckily for me, I have a friend who has lent me his Arduino kit which I used for this practical.
If you are interested in learning more, I would advise you should check out more about *SPEEDVIBE to know what they deal with and the courses available for learning.
WHO IS STARSTRINGS01
Starstrings01 AKA Giftedhands is a Hive lover, a Nigeria musician (Guitarist) and also a student who studies Mechatronics Engineering in the Federal University of Agriculture, Abeokuta.
His goal on Hive is to be more than a regular blogger but something more; someone with a purpose. That’s one of the reasons why he founded the newbies initiative @newbies-hive to help guide and support newbies. Kindly click here to follow @newbies-hive curation trail.
He battles and struggles with balancing education and being active on the chain but yet his love and passion for Hive keeps him on balance.
I can see you are moving and developing the skills gradually, well-done @starstrings01. DHT11 is a temperature and humidity sensor and it is utilized in lots of projects where the need to measure these weather parameters is required. You can also checkout BME280, it is always a sensor used in measuring weather parameters such as temperature, humidity, altitude, and also air pressure with higher accuracy and precisions.
I don't know how to say this. But I'm really impressed and happy to see you do this bro. Thumbs up 👍.
This is damn hard!! Engineering and coding are two of those things that don't come easily to me and I consider them hard.
The only thing I could relate with is the thermocouple. I had to read that to pass my physics exams, lol.