RSS

Tag Archives: I2C

Grove Beginner Kit for Arduino | SEEEDSTUDIO | The BREAKOUT | GROVE Pressure Sensor BME280 on Normal LCD1602 I2C Display | First Steps with the Arduino-UNO R3 and NANO | Maker, MakerED, Maker Spaces, Coding

Grove Beginner Kit for Arduino | SEEEDSTUDIO | The BREAKOUT | GROVE Pressure Sensor BME280 on Normal LCD1602 I2C Display | First Steps with the Arduino-UNO R3 and NANO | Maker, MakerED, Maker Spaces, Coding

.

.


GROVE Pressure Sensor BME280 on Normal LCD1602 I2C Display

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/, and THE BREAKOUT to use the different modules with OWN Code examples.

WE were ALSO using the OLED module as a BREAKOUT in this tutorial https://gustmees.wordpress.com/2020/10/21/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/

In this tutorial WE will use the BREAKOUT of the GROVE Pressure-Module BME280 together with a NORMAL I2C LCD1602 display, ONLY 4 wires to connect. At that moment I didn’t yet receive my ordered GROVE LCD1602 display, so the suspense was great to find out… I was curious to find out if that would ALSO work and it did with a few changes of code.

Check out the wiring below, please:

.

.

                                                       I2C LCD1602                        SEEEDUINO MAINBOARD

                                                      + 5V  <======================>  + 5V

                                                       GND  <======================> GND

                                                       SDA  <======================>  SDA

                                                       SCL  <======================>  SCL


The Code

.

Click image, please, to enlarge.

.

Find here below, please, the Code for download in “.odt Format”:

.

 

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, LCD1602, BME280, Pressure, Altitude Monitor, I2C, SEEEDSTUDIO,

 

 

.

.

.

 

 

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

Social Distancing Monitor with Alarm, Arduino NANO and I2C LCD2004 Display | Maker, MakerED, Maker Spaces, Coding

Social Distancing Monitor with Alarm, Arduino NANO and I2C LCD2004 Display | Maker, MakerED, Maker Spaces, Coding

.

 

 

.


Social Distancing Monitor with Alarm, Arduino NANO and I2C LCD2004 Display

In previous tutorial we were using an LCD1602 display, this time we will use an LCD2004 display which gives us the opportunity to display on four (4) lines. That enables us to display more accurate text.

The wiring is exactly the same as already mentioned in previous tutorial, there is ONLY to make a few changes in the code, please check:

The complete Code fr an LCD1602 display could get downloaded in “.doc” format below.

Download and open the document, copy it and bring it in a NEW Sketch of the Arduino IDE. Upload it to the Arduino Nano and have fun with it!

SO, once uploaded we will need to change some code to make it work for an LCD2004 display, we will see how below.

.

Click image, please, to enlarge.

.

Click image, please, to enlarge.

.

Well, as you can see there isn’t a lot of changes, easy!! A 5 minutes project 😉 Once you have changed the mentioned lines, upload the code again.

And IF you want to START straight on, here below is the code in .doc format:

 

.

 

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”.

.

.

.

.

 

 

 

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

Social Distancing Monitor with Alarm, Arduino NANO and I2C LCD1602 Display | Maker, MakerED, Maker Spaces, Coding

Social Distancing Monitor with Alarm, Arduino NANO and I2C LCD1602 Display | Maker, MakerED, Maker Spaces, Coding

.

.


Social Distancing Monitor with Alarm, Arduino NANO and I2C LCD1602 Display

In times of the Coronavirus-Crisis (Covid_19), it might be GOOD to respect the 2 meters distance to avoid getting infected!!! But not everybody can estimate distances, nor are ALL persons respecting the 2 meters rule!!! So came the idea to build an easy to realize gadget, which measures the distance and gives an alarm when the 2 meters are not respected.

First of all, like usual, I was searching the internet to find out if there isn’t already such a project around. And YES, there is one; I found a tutorial with an Arduino MEGA and a LCD1602 ISP with provided code as well. Please check below:

 

This tutorial gave me the idea to start. Instead an Arduino MEGA, I used an Arduino NANO; and instead of an LCD1602 ISP, I used an LCD1602 I2C.

Thus meaning: it needs a bit to adjust the code in the sketch in the above mentioned tutorial and it’s LESS cabling, wiring needed to connect the I2C LCD1602 display.

WE played around already with I2C LCD1602 in my tutorial below, please check:

SO, here we go for the wiring… Below the wiring for the I2C LCD1602 with the Arduino NANO

:

I2C LCD1602 PINOUT-Arduino NANO

.

LCD-I2C-PINOUT-ARDUINO


Connecting the HC-SR04 Ultrasonic Sensor:

 

Connections to the Arduino NANO:

Vcc+ gets connected to + 5V

GND to GND

ECHO gets connected to PIN 10

TRIGGER gets connected to PIN 9


Connecting the Buzzer for the acoustic Alarm:

 

The + sign of the Buzzer gets connected to PIN 8 of the Arduino NANO and the other pin to GND!

Below you see the prototype with wiring.

.

 

.


The code

Here below see a preview of the Code:

Code preview

The complete Code could get downloaded in “.doc” format below.

Download and open the document, copy it and bring it in a NEW Sketch of the Arduino IDE. Upload it to the Arduino Nano and have fun with it!


Ordering the necessary parts

.

LCD1602 + I2C Modul

LCD1602-I2C

Click image, please, to enlarge.

Arduino NANO

ARDUINO NANO

Click image, please, to enlarge.

 

Click image, please, to enlarge.

 

 

Click image, please, to enlarge.

.

All you need now is to put everything into a case. I was choosing a cardboard (recycling) 😉

.

Social Distancing Monitor

 

 

 

Click image, please, to enlarge.

Social Distancing Monitor

 

 

Click image, please, to enlarge.

 

Social Distancing Monitor

Click image, please, to enlarge.

 

 

.

.

 

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”.

.

.

.

.

.

.

.

.

.

 

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

First Steps with the Arduino-UNO and NANO | Maker, MakerED, MakerSpaces, Coding | Temperature & Humidity monitor using Arduino NANO + DHT22 + 0.96 inch 128X64 I2C OLED

First Steps with the Arduino-UNO and NANO | Maker, MakerED, MakerSpaces, Coding | Temperature & Humidity monitor using Arduino NANO + DHT22 + 0.96 inch 128X64 I2C OLED

.

.


Temperature & Humidity monitor using Arduino NANO + DHT22 + 0.96 inch 128X64 I2C OLED

WE were playing around a lot already with I2C-LCD displays <===> https://gustmees.wordpress.com/?s=i2c+lcd <===> but not yet with I2C-OLEDs. In this tutorial WE will create a <===> Temperature & Humidity monitor using Arduino NANO + DHT22 + 0.96 inch 128X64 I2C OLED <===> which displays the temperature in °F AND °C, as well as it displays the “Heat Index“.

FIRST of all, let us talk about the Heat Index“, what it is and WHY it could be important to display it:

.

Heat-Index in °C

.

Click the image, please, to access the article

.

Heat-Index in °F

.

Click the image, please, to access the article

.


NO more Theory now, the PracTICE!

Let us have a look on the wiring and check the below Fritzing, please. It shows a DHT11 Sensor instead of a DHT22 Sensor, but the wiring is the same. It shows ALSO a 220 Ohm resistor instead of a 10K resistor!! Use a 10K resistor please!!

.

.

Once finished the wiring, WE will need to go for the coding by using a Sketch, we will use a already done Sketch, which WE can transform to our needs from:

IF you use “°Fahrenheit” you can use it without any changes, but IF you use “°Celsius” in your country WE will need to make some changes in the code, which WE will discuss the How-To here below.

First step: you can change the text, IF wanted: Original says "DHTxx test!", I changed it to what you see below; GET creative ;)

.

 

Click image, please, to enlarge

.

SO, here below the changes to make to display in “°Celsius“:

 

Click image, please, to enlarge

.

 

You might need to add certain libraries, see below please which ones will GET needed, please.

.

.

 

IF a newbie, please check the below tutorial for the How-To:

.

Well, that ISN’T difficult folks 😉

.


Check the video below, please, to see it in action (Fahrenheit version).

.

.

Check out ALSO, please, the tutorial below about DHT 11, DHT22 Sensors on Arduino and Raspberry PI:

.


Prices and where to order

 

128 x 64 Pixel 0.96 Inch I2C OLED Display

 

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, 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 | Maker, MakerED, Maker-Spaces, Coding | Useful Tips | I2C LCD-Display Errors Solving

First Steps with the Arduino-UNO | Maker, MakerED, Maker-Spaces, Coding | Useful Tips | I2C LCD-Display Errors Solving

.

I2C Addresses on LCD1602

.


LCD-Display Errors Solving

WHO doesn’t have that error already with LCD-Displays: Once uploaded (compiling) the code to the Arduino IDE there could be some errors happening, it happens to me… Please check PIC below:

 

ERROR-1

Click image, please, to enlarge

.

Well I made some searches on the internet and I found the right answer on a forum about this error, which says that one should scan the I2C Address of the device and replace the “lcd.init();” by “lcd.begin (0x3F,16,2);” whereby “0x3F” is the I2C Address of my LCD1602/I2C module. I scanned to find out the I2C Addess with this sketch, please check here:

I bought 3 from Amazon (Germany) delivered from “AZ Delivery” <===>  https://www.amazon.de/gp/product/B079T1BW6T  <===> and they should have had ALL the I2C-Address “0X27” as explained in their FREE eBook <===>  https://bibliothek.az-delivery.de/wp-content/uploads/2018/01/11-AZ-Delivery_16x2LCD-I2C-Display-Bundle_Startertutorial.pdf   <===> but ONLY 1 had this address and two others the I2C-Address “0X3F”!! BTW: AZ Delivery has very GOOD stuff for reasonable prices!

Here below the results of the scan of the I2C-Address, shown in the Serial-Monitor of the Arduino IDE:.

 

I2C-ADDRESS-SCAN

Click image, please, to enlarge.

.

I2C-ADDRESS-SCAN-2

Click image, please, to enlarge.

.

SO, make sure to FIRST scan the I2C-Address through the above mentioned Sketch, will save you a lot of stress! 😉

TIP: Use a DYMO, print out the I2C-Addresses and glue them on the backside of the LCD1602 Display, so you know for next projects WHAT I2C-Address the module has! 😉 In a couple of weeks you wouldn’t remind it anymore! 

.

I2C Addresses on LCD1602

Click image, please, to enlarge.

.


Resolving the ERROR message

Coming back to resolve our ERROR-message and how to resolve it:

Please check the PIC below:

.

ERROR-1-Changing some code for working

Click the image, please, to enlarge.

.

Check the lines marked with ***************************, in my case it is lines 36 and 40-52! Change it as it is displayed above, save it and upload it; it should work correctly now!

.


Stay tuned for next blog posts and enjoy it 😉

Have FUN with your “LEARNing-By-Doing project” and try out ALSO the other examples 😉

.

Keywords necessary for me to create this blog post: Arduino, Coding, Maker, MakerED, MakerSpaces, Learning By Doing, Learning To Learn, PracTICE, LCD-Displays, I2C,

.


.

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). 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) 😉..

.

.

 

 

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

First Steps with the Arduino-UNO R3 and NANO | Maker, MakerED, Maker-Spaces, Coding | LCD1602-I2C | Tips

First Steps with the Arduino-UNO R3 and NANO | Maker, MakerED, Maker-Spaces, Coding | LCD1602-I2C | Tips

.

I2C Addresses on LCD1602

.


LCD1602-I2C isn’t working.

Well, I made some searches on the internet and I found the right answer on a forum about this error, which says that one should scan the I2C Address of the device and replace the “lcd.init();” by “lcd.begin (0x3F,16,2);” whereby “0x3F” is the I2C Address of my LCD1602/I2C module. I scanned to find out the I2C Addess with this sketch, please check here:

I bought 3 from Amazon (Germany) delivered from “AZ Delivery” <===>  https://www.amazon.de/gp/product/B079T1BW6T  <===> and they should have had ALL the I2C-Address “0X27” as explained in their FREE eBook <===>  https://bibliothek.az-delivery.de/wp-content/uploads/2018/01/11-AZ-Delivery_16x2LCD-I2C-Display-Bundle_Startertutorial.pdf   <===> but ONLY 1 had this address and two others the I2C-Address “0X3F”!! BTW: AZ Delivery has very GOOD stuff for reasonable prices!

Here below the results of the scan of the I2C-Address, shown in the Serial-Monitor of the Arduino IDE:.

 

I2C-ADDRESS-SCAN

Click image, please, to enlarge.

.

I2C-ADDRESS-SCAN-2

Click image, please, to enlarge.

.

SO, make sure to FIRST scan the I2C-Address through the above mentioned Sketch, will save you a lot of stress! 😉

TIP: Use a DYMO, print out the I2C-Addresses and glue them on the backside of the LCD1602 Display, so you know for next projects WHAT I2C-Address the module has! 😉 In a couple of weeks you wouldn’t remind it anymore! 

.

I2C Addresses on LCD1602

Click image, please, to enlarge.

.


Resolving the ERROR message

Coming back to resolve our ERROR-message and how to resolve it:

Please check the PIC below:

.

ERROR-1-Changing some code for working

Click the image, please, to enlarge.

.

Check the lines marked with ***************************, in my case it is lines 36 and 40-52! Change it as it is displayed above, save it and upload it; it should work correctly now!

.


.

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, MakerSpaces, Coding | How-To transform an LCD1602 SPI Sketch to an LCD1602 I2C Sketch

First Steps with the Arduino-UNO R3 and NANO | Maker, MakerED, MakerSpaces, Coding | How-To transform an LCD1602 SPI Sketch to an LCD1602 I2C Sketch

.

Fritzing-Wiring

.


How-To transform an LCD1602 SPI Sketch to an LCD1602 I2C Sketch

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!

.

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,  transforming normal LCD1602 Sketch into I2C Sketch

.

.

 

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 NodeMCU ESP8266 | Maker, MakerED, Coding | Text on I2C-LCD1602 Display written over Web-Page

First Steps with the NodeMCU ESP8266 | Maker, MakerED, Coding | Text on I2C-LCD1602 Display written over Web-Page

.

I2C-LCD WEB-TEXT on NodeMCU ESP8266

.


Text on I2C-LCD1602 Display written over Web-Page

Sometimes it might be useful to write a text which should be displayed on a LCD display without any cabling, that is possible to do over your own Wi-Fi network and a NodeMCU ESP8266 module. And the project uses ONLY 4 wires as the LCD1602 gets addressed over the I2C bus. Let us remember WHAT the I2C bus is in our previous tutorial:

Check out the wiring below please, ONLY 4 wires plus 2 for the power supply connections:

.

.

Let us have a look on the video below who shows how it works:

.

.

SO, knowing now how it works, let us have a look on the Sketch (Code). I changed a bit the code, as I am using an I2C LCD1602 and I added as well some more text displayed on the LCD1602 display. Check below, please, the original code. I will explain WHAT could (should) GET changed later with a screenshot of the changes and/or a download…

The Arduino code and the library for this project can be found at the links below. The library has to be saved in the Arduino libraries folder of the same name:

 

Find below, please, my changed code (Sketch) for downloading:

The download is a text file created with OpenOffice, copy the content and place it into a new Sketch on the Arduino IDE. ALL you have to do now is to change some lines, e.g.:

  • in line 47: Enter your SSID
  • in line 48 Enter your Wi-Fi Network Password

See PIC below, please:

.

CODE-CHANGE

Click image, please, to enlarge.

.

This should work for you now; in case of that you wouldn’t see the display working find here the trouble-shooting:

Mostly it is that your LCD1602 uses a different I2C-Address and/or that the ESP8266 isn’t allowed in your network for security reasons, to make sure check my blog post here, please:

Here below a working Sketch which shows how it is working: for security reasons you won’t see my SSID, nor my real IP-Address! 😉

.

.


.

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: NodeMCU, ESP8266, Web Server, I2C, LCD1602, Coding, Maker, MakerED, MakerSpaces…

.

.

.

.

 

.

.

.

.

.

.

.

 

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