RSS

Tag Archives: Temperature/Humidity Sensor DHT11

Grove Beginner Kit for Arduino | SEEEDSTUDIO | The BREAKOUT | Temperature/Humidity on OLED Display |First Steps with the Arduino-UNO R3 and NANO | Maker, MakerED, Maker Spaces, Coding

Grove Beginner Kit for Arduino | SEEEDSTUDIO | The BREAKOUT | Temperature/Humidity on OLED Display |First Steps with the Arduino-UNO R3 and NANO | Maker, MakerED, Maker Spaces, Coding

.

 

.


Temperature/Humidity on OLED Display | THE Breakout

In a previous tutorial WE have seen the Grove Beginner Kit for Arduino from SEEEDSTUDIO https://gustmees.wordpress.com/2020/08/03/grove-beginner-kit-for-arduino-seeedstudio-first-steps-with-the-arduino-uno-r3-and-nano-maker-makered-maker-spaces-coding/, now WE make THE BREAKOUT to use the different modules with OWN Code examples.

You can also take the modules out and use Grove cables to connect the modules. To do so, you need a sharp cutter, see PIC, please.

.

.

My recommendation for sharp cutters, which I use as well:

.

 

.

Once cut out you have made the BREAKOUT and in this case the two modules “OLED Display 0.96 inch” and “Temperature/Humidity” modules are ready to get connected to the main module. NOW we have to connect them through the delivered connection cables. Here below a picture:

.

.

As you can see, the OLED-Module is connected to the I2C connector, while the “Temperature/Humidity-Module” is connected to the “D3” connector. See PIC below, please:

.

.

SO WHY the “D3” connector for the “Temperature/Humidity-Module”?! Well, let us have a look on the code:

.

.

As you can see in this shown part of the code, there is marked ===> “#define DHTPIN 3“, SO it should GET connected to the “D3-connector” on the main board! If you use “D4” or whatever connector, SO you should change the code from “3” to “4” and so on!!! Give it a try and play around with it for understanding 😉

.


Temperature/Humidity on OLED Display | THE Code

Well, the two connections with the provided cables with connectors took ONLY a few seconds, ISN’T it? 😉 Let’s GO now to upload the code. Open your “Arduino IDE“, click on “NEW“, erase the few lines marked in there, make a “Copy&Paste” from the mentioned Code below and paste it in the “Arduino IDE (NEW)” and upload it, here below the code:

.

.

As you can see there is a “special” indication on the display, THE “Heat Index“, WHAT is it?! I encourage you to read my following tutorial which explains:

 

Have fun learning with PracTICE and stay tuned for next adventures of learning 😉

.

 


.

L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet  ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness and Security Enhancement Structure)..


The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).

.

.


.

Keywords necessary for me to create this blog post: Arduino UNO R3, Arduino NANO, Grove, Grove Beginner Kit for ARDUINO, Coding, Maker, MakerED, Maker Spaces, OLED, DHT11, Temperature and Humidity Monitor, I2C, SEEDSTUDIO,

.

.

 

 

Tags: , , , , , , , , , , , , , , , , , , , , ,

First steps with the Arduino UNO, NANO | Displaying Time, Date, Temperature and Humidity on a LCD2004 Display | Maker, MakerED, Maker Spaces, Coding

First steps with the Arduino UNO, NANO | Displaying Time, Date, Temperature and Humidity on a LCD2004 Display | Maker, MakerED, Maker Spaces, Coding

.

.


Displaying Time, Date, Temperature and Humidity on a LCD2004 Display

We were already playing around with a LCD2004 display in a previous tutorial where we displayed the temperature and the humidity <===> First Steps with the Arduino-UNO R3 and NANO | Maker, MakerED, Coding | I2C LCD Temp./Humidity displaying, now we will add as well Time and Date with a DS3231 module.

We will use the tutorial from <===> Arduino datalogger with SD card, DS3231 and DHT22 sensor, where we will NOT use the datalogger for our project to make it as easy as possible; courageous ones, once the project is working for them, may add the datalogger 😉 In that tutorial you will find also the code…

Please check video tutorial below:

.

.

Check also the blog below, please:

.

Check the schematic above please to know how to wire it; first we will do it on a breadboard and later we could solder it… Do the wiring as shown, without the Datalogger-SDCard-Module. See PIC below, please.

.

.

In the above image you will see an DHT11 Sensor (blue case) as at the time I didn’t have it yet (was ordered…) a DHT22 Sensor (white case) as shown on the finished project. As the project works we can now solder everything together on a strip-board, choosing a case; I used a cardboard box with the dimensions of 140 mm X 130 mm X 60 mmm, fixing the LCD2004 and the DHT22-Sensor on the front of the cardboard box.

.

Components soldered on a Stripboard

Components soldered on a Stripboard

.

Soldering cables on the DHT22 sensor and isolating pins with heatshrink tube

Soldering cables on the DHT22 sensor and isolating pins with heatshrink tube

.

Soldering cables on the I2C adapter of the LCD2004 and isolating pins with heatshrink tube

Soldering cables on the I2C adapter of the LCD2004 and isolating pins with heatshrink tube

.

Fixing the LCD2004 display on the frontpanel and the distance bolts

Fixing the LCD2004 display on the frontpanel and the distance bolts

.

Final assembling of the parts

Final assembling of the parts

.


The finished project

.

 

.

As you can see in above image, I added some text with a Dymo tape, looks better 😉

 


The Sketch (Code) for the project

One thing missing, the sketch (code). Please find it below and open it , copy it and paste it to the Arduino IDE:

Read the comments in the sketch to understand the changes which I made to the original, it’s actual easy…

.


Prices and where to order

 

RTC DS3231

 

Click image, please, to enlarge.

Arduino NANO

ARDUINO NANO

Click image, please, to enlarge.

 

LCD2004-I2C

Click image, please, to enlarge.

 

 Temperature/Humidity SensorsDHT11

.

 


L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet  ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness and Security Enhancement Structure)..


The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).

.


.

Stay tuned for next blog post(s) 😉

.

.

 

Tags: , , , , , , , , , , , , , , , , , , , , , , , , ,

First Steps with the Arduino-UNO R3 and NANO | Maker, MakerED, Coding | I2C LCD Temp./Humidity displaying

First Steps with the Arduino-UNO R3 and NANO | Maker, MakerED, Coding | I2C LCD Temp./Humidity displaying

.

LCD1602 and LCD2004

.


Displaying Temperature/Humidity on a I2C LCD 

We were already playing around, as seen on my tutorials below, with the Temperature/Humidity sensors DHT11, DHT22 and LCD1602, without I2C possibility. There were a lot of cables to connect, we will try out this time to use a LCD with I2C bus connection as it uses ONLY 4 wires to connect. It’s a perfect project for newbies in coding as they will see the measured values directly on the LCD screen, the success and happy factor is guaranteed!

Related tutorials:

 

Let us have first a look on the wiring (cabling) which is actually very easy, have a look below please:

.

Fritzing-Wiring

====> Click image, please, to enlarge.

The wiring (cabling) will take about +/- 5-10 minutes depending on your own rhythm… Let us have a look on the coding now: we will use exactly the same code (Sketch) as in our first tutorial here, which we will change just a bit to fit for I2C LCD1602 display:

Copy&Paste the code from above tutorial where it is marked “I also made an example where I display the results on a LCD. Here’s the source code of that example:” and paste it into the Arduino IDE. Connect the Arduino NANO with your computer now. Open the Arduino IDE and choose the board “Arduino NANO”, see screenshot below, please:

Arduino-IDE-Board Manager-1

Click image, please, to enlarge.

.

Next step, on the same Arduino IDE select the Processor:

.

Arduino-IDE-Board Manager-OLD-NEW-BOOTLOADER

Click image, please, to enlarge.

.

TIP: when the LED on the Arduino NANO is lightning GREEN it is an original NANO and you must choose “Atmega328P”; if the LED is lightning RED, it is a clone and you must choose “Atmega328P (Old Bootloader)”.

.

NOW it is about time to adapt the code (Sketch) to an I2C-LCD1602 display, let us have a look on the Sketch (the original):

.

OLD Code to change

Click image, please, to enlarge.

.

As we can see in line 10: the library is meant for a normal LCD display, it needs to get changed for a “I2C LCD Library”.

In line 15: the same it shows the wiring pins for a normal LCD display, it needs to get changed for a “I2C LCD” display.

In line19: It is BETTER to add as well the I2C-Address, mostly “0x27” OR “0x3F”.

That is NOT much to change, we will see in the screenshot below the How-To:

.

NEW Code to change

Click image please, to enlarge.

.

By enlarging (click on the image) you will see by comparing where the changes are. I commented in the lines the WHY… Try it out to change it yourselves or just download the Sketch (Code) here below who is working:

Copy&Paste this code into a NEW Sketch on the Arduino IDE and upload now the code to the Arduino NANO (or Arduino UNO) and enjoy it! 😉 Here below a photo of the working sketch:

.

DHT11 on LCD I2C Display

.

And in case of that you have a I2C LCD with 20×4 configuration it works also, check photo below please:

.

I2C LCD2004 and DHT11

.

As you can see the two first lines from 4 possible lines are only used, that is normal as the Sketch (Code) is actually written for a 2 line LCD. BUT we can add some lines of code in the original Sketch to make it working on 4 lines, which is very easy actually, check below please for explication:

.

Printing text on the LCD

Click image, please, to enlarge.

.

As you can see in line 30 in above screenshot of the code ===> “lcd.setCursor(0,0); // Sets the location at which subsequent text written to the LCD will be displayed” the the line is set to “0” which means the first line on the LCD1602. By changing the value to “lcd.setCursor(0,1)” in line 30 and in line 34 to “”lcd.setCursor(0,2)” the text will be displayed as follows, see photo below please:

.

I2C LCD2004 DHT11

.

NOW, as you can see, we have two lines without any text where we could bring in some text. Let us try to find out HOW! We have seen already that “lcd.setCursor(0,0) above. We used in above example the lines 2 and 3 from 4 lines which were displayed as shown in above photo, right?

 

Printing text on the LCD in 4 lines

Click image, please, to enlarge.

.

Check lines 26 and 27 and also lines 37 and 38: I added them, do the same and the text between the “………” you may change it with your OWN text what will result in following, check photo below, please:

.

 

I2C LCD2004 4 lines of text

.

BUT wait, my text looks centralized and yours NOT, HOW?! Check photo below, please which explains:

.

4 Lines centered on I2C LCD

.


Prices and where to order

 

LCD1602 + I2C Modul

LCD1602-I2C

Click image, please, to enlarge.

Arduino NANO

ARDUINO NANO

Click image, please, to enlarge.

 

LCD2004-I2C

Click image, please, to enlarge.

 

 Temperature/Humidity Sensors

DHT11

.

.

Stay tuned for next blog post(s) 😉

.


.

GUST-AVRIL2014-800px-2L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet  ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness and Security Enhancement Structure). L’auteur était aussi gagnant d’un concours en électronique en 1979 ( Pays germaniques ) et voyait son projet publié dans le magazine électronique “ELO”.


The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).

The author was also a winner of an electronics contest (Germanic countries) in 1979 and got his project published in the “Electronics Magazine ELO”.

.

.

Keywords necessary for me to create this blog post: Arduino UNO R3, Arduino NANO, UNO R3 Project, LCD 1602, Sensors, DHT11,  DHT22, Temperature/Humidity Sensor, coding, learning to learn, learning by doing, trouble shooting, hygrometer, I2C, LCD 20×4,

.

.

.

.

 

 

Tags: , , , , , , , , , , , , , , , , , ,

First Steps with the Arduino-UNO R3 | Maker, MakerED, Coding | Super Starter Kit UNO R3 Project | LCD and Sensors Project

First Steps with the Arduino-UNO R3 | Maker, MakerED, Coding | Super Starter Kit UNO R3 Project | LCD and Sensors Project

.

Temperature/Humidity Sensor DHT11 and LCD1602

.


Super Starter Kit UNO R3 Project | LCD and Sensors Project | Temperature/Humidity Sensor DHT11

SO, as I got my new Super Starter Kit UNO R3 Project I am playing around a bit with it. In my previous post WE were wiring and testing a LCD-Display and coding to display a bit text on the LCD. That was actually very easy, so lets try out now some “Sensors“, e.g. a Temperature/Humidity Sensor and a Ultrasonic Sensor to measure distances. The measured values of those sensors will get displayed on the LCD-Display.

Let us start first with the Temperature/Humidity Sensor DHT11 which is included in the Kit:

WE will use the following tutorial from Dejan Nedelkovski (How To Mechatronics) as it is very well documented and explained (no need for me to create a new one…). First we will check the video below, please, where we will get explained the How-To and some theoretical explications:

.

.

SO, now after knowing what will be necessary to do, we will first make the wiring of the LCD-Display, please check below:

.

LCD1602-Wiring with Arduino

Click the image above please to access the tutorial

.

As you can see in the above wiring diagram, there isn’t that much wiring to do. When following the tutorial <===> Arduino LCD Tutorial <===> you will get proposed some examples of code to play around with. Try them out to repeat the learned from previous blog post or just leave the wiring as it is to proceed to the next step, the wiring of the Temperature/Humidity Sensor DHT11.

We will continue to follow the tutorial <===> DHT11 & DHT22 Sensors Temperature and Humidity Tutorial using Arduino <===> where the Temperature/Humidity Sensor DHT22 is used. As we use DHT11, you need only to forget about the resistor as it is not needed, replace it by a connection cable (strip).

.

DHT22-Wiring Diagram

Click the above image please to access the tutorial

.

The wiring ready now, we go for the coding. The sketch is available here <===>  DHT11 & DHT22 Sensors Temperature and Humidity Tutorial using Arduino <===> Upload it into the Arduino IDE and give it a try. You will see the result as shown in the image below:

.

DHT22 Code for DHT11

.

There is something strange on the displayed values, isn’t!? WHAT happend!? Let us make some trouble-shooting: the wiring is OK, otherwise the wouldn’t be anything displayed, is the sensor defective!? If you have a second one, replace it to make sure. Same results again, hmmmm!? OK, it’s mysterious on some way, but there must be a solution for it… Let us check the sketch, the code, again to try to understand WHAT the Arduino is getting told to do and WHY the display shows something completely different, the problem is certainly then in the code. Let us review the video tutorial, perhaps we missed something (I did…). In the video, if really listened to, it get explained the two possibilities, using a sensor DHT11 or a DHT22. The code is written for a DHT22 sensor and we use a DHT11 sensor; so WHAT to change now in the code!? Please check the screenshot of the sketch below:

.

Sketch-DHT22-Arduino

Click the image please to enlarge it

.

Once change that code line upload it to the Arduino IDE and see WHAT happens on the LCD-Screen. See PIC below please.

.

Temperature/Humidity Sensor DHT11 and LCD1602

.

Well, that’s success!! It works correctly now 😉 Play around with it to see the difference on the LCD-Display while blowing on the sensor. Give it a bit time that the measured values go back again to the previous shown one. SO, as we had now a positive experience and where we can see WHAT is happening on the LCD-Display, let us try another project, we will measure distances with the Ultrasonic-Sensor. But befor we ared going for a NEW project we need to save our project, check the video tutorial below please.

.

 


Super Starter Kit UNO R3 Project | LCD and Sensors Project | Ultrasonic Sensor HC-SR04

We will keep exactly the same wiring diagram for the LCD-Display and taking away the Temperature/Humidity sensor with its wires from the Breadboard. Then we will have a look on the following tutorial, we will use the tutorial from  Dejan Nedelkovski (How To Mechatronics) again, check please <===> http://howtomechatronics.com/tutorials/arduino/ultrasonic-sensor-hc-sr04/ <===> as the previous one was working well! SO, remember that you have to remove the DHT11 Sensor and the wires from it to the Arduino board and follow the next wiring diagram, please. First we will watch the video tutorial.

.

.

Here below the wiring diagram.

ULTRASONIC-HC-SR04-Wiring diagram-LCD-Display

Click the image please to access the tutorial

.

Next step is to load the code, follow <===> If you want to display the results from the HC-SR04 Ultrasonic Sensor on an LCD you can use the following source code from <===> http://howtomechatronics.com/tutorials/arduino/ultrasonic-sensor-hc-sr04/ <===> and to upload it to the Arduino IDE. That’s it folks, check below please to see the result!

.

ULTRASONIC SENSOR-HC-SR04-and LCD-DISPLAY

.

It works up from the beginning, a success experience! Well folks, as you see it isn’t that much difficult to play around with the Arduino and Coding; don’t forget to save your project so that you can use it again if once needed and try out other projects as well, check the <===> Elegoo UNO R3 Project Super Starter Kit <===> PDF download to GO for NEW LEARNing-By-Doing adventures 😉

.

Was this post helpful for you!? Please let me know by your comments, thank you!


.

GUST-AVRIL2014-800px-2L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet  ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness and Security Enhancement Structure). L’auteur était aussi gagnant d’un concours en électronique en 1979 ( Pays germaniques ) et voyait son projet publié dans le magazine électronique “ELO”.


The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).

The author was also a winner of an electronics contest (Germanic countries) in 1979 and got his project published in the “Electronics Magazine ELO”.

.

Stay tuned for next blog post(s) 😉..
.

.

Keywords necessary for me to create this blog post: Arduino UNO R3, Super Starter Kit UNO R3 Project, LCD 1602, Sensors, DHT11, Temperature/Humidity Sensor, Ultrasonic Sensor, HC-SR04, coding, learning to learn, learning by doing, trouble shooting,

.

.

.

 

 

Tags: , , , , , , , , , , , , , , , , , , , , , , , ,