0% found this document useful (0 votes)
108 views

ES Experiment No. 04 B-10

This document describes an experiment to interface an LCD display with an Arduino board to display a name. It includes the aim, software and components used, wiring diagram, code samples, and output screenshots. The code samples demonstrate how to display text statically on the LCD and how to enable automatic scrolling text from right to left. Key LCD library functions like begin(), setCursor(), print(), and autoscroll() are explained.

Uploaded by

Shubham Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

ES Experiment No. 04 B-10

This document describes an experiment to interface an LCD display with an Arduino board to display a name. It includes the aim, software and components used, wiring diagram, code samples, and output screenshots. The code samples demonstrate how to display text statically on the LCD and how to enable automatic scrolling text from right to left. Key LCD library functions like begin(), setCursor(), print(), and autoscroll() are explained.

Uploaded by

Shubham Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Name – Shubham Rajesh Patil

B-10
Roll no. – 10

Experiment No. 04

Aim –
To interface LCD with Arduino and display your name.

Software used –
Tinkercad.

Components used –
Arduino Uno, Resistors (220 ohm), Breadboard small, LCD 16x2, Connecting wires.

Procedure –
 Open the Tinkercad software.
 Create new project.
 Select all the components.
 Connect the components appropriately.
1. LCD RS pin to digital pin 12.
2. LCD Enable pin to digital pin 11.
3. LCD D4 pin to digital pin 5.
4. LCD D5 pin to digital pin 4.
5. LCD D6 pin to digital pin 3.
6. LCD D7 pin to digital pin 2.
7. LCD R/W pin to GND.
8. LCD VSS pin to GND.
 Write the code in the text box.
 Click on start simulation.
 Once the simulation is started, whatever is wrote in the print statement it will get
displayed on the LCD.

Code –

Code 1 :

#include<LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3,


2); void setup()
{
lcd.begin(16, 2);
}

void loop()
{
lcd.setCursor(0,0);
lcd.print("

Shravani");
lcd.setCursor(2,1);
lcd.print(" Kadam");
}
Code 2:

#include <LiquidCrystal.h>

LiquidCrystal lcd (12, 11, 5, 4, 3,


2); void setup()
{

lcd.begin(16, 2);
}

void loop()
{
lcd.setCursor(0, 0);
lcd.autoscroll();
lcd.print("Shravani");
delay(500);
}
Output –

Here, is the connections of the circuit before simulation.

Here, is the output (Given input in the print statement) displayed on the LCD.
Here, is the output (whatever is given as an input) displayed on the LCD. Where the output
is scrolling from right to left beca
Commands Used –
 #include<LiquidCrystal.h> - We use the LiquidCrystal library for controlling LCD. It is
a LCD library that allows us to interface with LCD.
 Void setup() – Use it to initialize variables, pin modes, start using libraries, etc.
 Lcd.begin(16,2) - Initializes the interface to the LCD screen, and specifies the
dimensions (width and height) of the display.
 Void loop() - The code inside the loop function runs over and over as long as
the Maker Board is turned on.
 lcd.setCursor(0,0) - Position the LCD cursor; that is, set the location at
which subsequent text written to the LCD will be displayed.
 lcd.print - Prints text to the LCD.
 lcd.autoscroll() - Turns on automatic scrolling of the LCD. This causes each
character output to the display to push previous characters over by one space.
 Delay(500) - When we do delay(500) our Arduino stops on that line for 0.5 second.

Conclusion –
Hence, we studied the interfacing of LCD with Arduino. In this, we learn about the different
variations to display the output using different commands. In code 1, we displayed the
name without any motion and in code 2, we displayed the name in continuous motion of 0.5
seconds where the output is scrolling from right to left.

***

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy