ElectroBlocks-archive-sept-2025/C2/Display-Text-on-LCD/English

From Script | Spoken-Tutorial
Revision as of 13:29, 20 June 2025 by Ketkinaina (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Title of the Script: Display Text on LCD

Author: Pratik Nemane

Keywords: Electroblocks, arduino board, breadboard, LCD Screen,I2C,SDA, Display, video tutorial, spoken tutorial.


Visual Cue Narration
Slide 1

Title Slide

Welcome to the Spoken Tutorial on Display Text on LCD using Electroblocks.
Slide 2

Learning Objectives

In this tutorial, we will learn how to,
  • Build a set of blocks to Display Text on LCD
  • Check the output of the experiment using the simulator
Slide 3

System requirements

To record this tutorial, I am using:
  • Ubuntu Linux OS version 22.04
  • ElectroBlocks application
  • Google Chrome web browser

A working internet connection to use ElectroBlocks.

Slide 4

Prerequisites

https://spoken-tutorial.org

To follow this tutorial, learner should have a basic knowledge of
  • Electroblocks interface
Open Google Chrome browser.

In New Tab, type

https://electroblocks.org/

Point towards Default Blink LED circuit.

Let us open the Electroblocks platform on Google Chrome.

In the address bar type this url and press Enter to open the Electroblocks interface.

Click on the New File/Blank file option available on the toolbar.

A pop-up window will appear on the screen.

Click on the OK button to start a new project.

Let us open a new blank file.
Main video

Click on Add-ons

Click on the LCD screen option.

Select Setup LCD block

Point to the LCD screen in the circuit.

Let us create a Display text on an LCD project.

Click on the Add-ons menu available on the left hand side of the screen.

Click on the LCD screen option.

Select the Setup LCD block and drag it to the working area.

This block activates the LCD screen in the circuit.

Point to memory type

Point to 0x3F

Point to 0x3F

Point to 0x27

Select the 0x27 .

By default the memory type is 0x3F in the Setup LCD Block.

0x3F is an I2C address.

I2C stands for inter-integrated circuit.

The I2C address is a unique identifier for communication.

Click on the dropdown option and select a suitable I2C address for your LCD screen.

If the LCD chip is from NXP Semiconductors manufacturer, its I2C address is 0x3F.

If the LCD chip is from a Texas Instruments manufacturer, its I2C address is 0x27.

In my case, I used the I2C address 0x27.

Point to size in lcd setup block

Point to 16x2

Only narration

By default the size of the LCD display is 16 by 2 (16x2).

16 represents the number of columns on the screen.

2 represents the number of rows on the screen.

Click on the dropdown option.

The platform also offers a 20x4 LCD display option.

A 20x4 display can print 20 characters per row across four rows.

For this project I have selected a 16x2 LCD display.

Point to SDA

Only narration

Point toward connected pin#

Point to SCL

Only narration

Point toward connected pin A5

In I2C LCD display, SDA stands for Serial data line.

The Serial Data Line carries the data between the arduino and the LCD.

By default, the SDA line of the LCD is connected to the A4 pin of the Arduino.

SCL stands for Serial Clock Line.

The Serial Clock Line synchronises the data transmission.

The SCL line of the LCD is connected to the A5 pin of the Arduino.

Only narration

Click on the LCD screen

Drag and drop the Print-> Delay-> Clear block inside the loop block.

Point to the block in the loop.

Now we will add an LCD Screen.

Click on the LCD screen option.

Drag and drop the Print-> Delay Clear block inside the loop block.

This block allows you to display words or numbers on any row of the LCD.

Click on the Print on Row 1 text Block, type “Hello All”.

Press Enter

Click on the Print on Row 2 text block, type “This is LCD

Press Enter.

Point to delay in print delay clear block.

Only narration.

Click on the Print on Row 1 text block, type “Hello All”.

Press Enter to save the changes made in the block.

Click on the Print on Row 2 text block, type “This is LCD

By default the delay of 3 seconds is shown at the end of the block.

This block displays the text for 3 seconds.

Only narration

Duplicate the Print Delay Clear block

Only narration

Drag and place this block below print delay clear block

Click on the Print on Row 1 text block, type “I will display

Press enter

Click on the Print on Row 2 text block, type “text on screen

Press enter

Right click on the Print Delay Clear block and select the Duplicate option.

This action creates an identical block in the working area.

Drag and place this block below print delay clear block

Click on the Print on Row 1 text block, type “I will display

Press Enter to save the changes.

Click on the Print on Row 2 text block, type “text on screen

Press Enter to save the changes.

Only Narration.

Click on Code Icon.

Now, we will see the arduino code generated by electroblocks.

Click on the Code icon.

Highlight #include <Wire.h> This library is required for I2C, that is (Inter-Integrated Circuit) communication.
Highlight #include <LiquidCrystal_I2C.h> This library handles communication between the Arduino and the LCD Screen.
Highlight LiquidCrystal_I2C lcd(0x27,2,16);

Point to 0x27,2,16

This command creates an lcd object, which represents the LCD screen.

0x27 is the I2C address of the LCD.

2 represents the number of rows.

16 represents the number of columns on the screen.

Highlight Void Setup loop

Highlight lcd.init()

Highlight lcd.backlight()

The Void Setup function runs once when the Arduino starts.

It initialises the LCD screen, making it ready for use.

This command turns on the LCD screen backlight, which improves visibility.

Highlight

Void loop()

The Void loop() function shows actions performed by components and sensors in the experiment.
Highlight

lcd.clear();

lcd.setCursor(0, 0);

This command is used to clear the screen.

This command sets the cursor to the first column, first row.

lcd.print(String("Hello All"));

lcd.setCursor(0, 1);

lcd.print(String("This is LCD"));

This command Prints "Hello all" on the first row.

This command sets the cursor to the first column, second row.

This command prints "This is LCD" on the second row.

Highlight

delay(3000);

Highlight

lcd.clear();

This command makes sure the above result is visible for 3 seconds on the LCD screen.

lcd.clear();

This command clears the screen after the delay.

Highlight

lcd.setCursor(0, 0);

Highlight

lcd.print(String("I will display"));

Highlight

lcd.setCursor(0, 1);

Highlight

lcd.print(String("text on screen"));

This command sets the cursor to the first column,first row.

This command Prints "I will display" on the first row.

This command sets the cursor to the first column, second row.

This command Prints "text on screen".

delay(3000); This command makes sure the above result is visible for 3 seconds on the LCD screen
We shall first check the desired result using the simulator.
Click on Home page

Click on the Play button

Click on the Home page option from the toolbar.

Click on the Play button to start the simulation.

Point to simulation window.

Point to the display.

Only narration

We will see the visual representation of the simulation.

"Hello All" and "This is LCD" are displayed for 3 seconds on the LCD screen.

Next, "I will display text on screen" is shown for another 3 seconds.

Then the screen is cleared.

Slide 5

Summary

In this tutorial, we learnt about:

  • Build a set of blocks to Display text on LCD
  • Check the output of the experiment using the simulator
This brings us to the end of this tutorial.

Let us summarise.

Slide 6

Assignment

  • Write your name, class and roll number on the LCD screen with a 5 second delay.
As an assignment, please do the following.
Add the Assignment video.mp4 in the main video with 10.27 timestamp. Notice the output of the assignment shown in the video.
Slide 7

Thank you

Thank you for joining.

Contributors and Content Editors

Ketkinaina, Madhurig, Nirmala Venkat