0% found this document useful (0 votes)
9 views18 pages

Arduino_DAY 2 - Session-1

The document provides an overview of Liquid Crystal Displays (LCDs), detailing their benefits, functionality, and common types like the 16x2 LCD. It also covers programming aspects using Arduino, including the LiquidCrystal library and keypad integration for various applications such as displaying messages and monitoring systems. Additionally, it includes practical exercises for implementing these concepts in Arduino projects.

Uploaded by

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

Arduino_DAY 2 - Session-1

The document provides an overview of Liquid Crystal Displays (LCDs), detailing their benefits, functionality, and common types like the 16x2 LCD. It also covers programming aspects using Arduino, including the LiquidCrystal library and keypad integration for various applications such as displaying messages and monitoring systems. Additionally, it includes practical exercises for implementing these concepts in Arduino projects.

Uploaded by

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

 LCD stands for Liquid Crystal Display and It is one kind of electronic display

used in wide range of applications like CD/DVD players, Digital Watch etc.,

 The main benefits of LCD are inexpensive; simply programmable, and there
are no limitations for displaying custom characters, simple animations, etc.

 The liquid crystals are made up of a part solid, part liquid substance that can
be "twisted" by applying electrical voltage to them.

 In the normal state, the crystals inside the liquid are twisted, and light can pass
through, once the crystals are subjected to an electrical current, they untwist,
blocking the light and makes the portion of the screen black.
DAY-2 Session-1 Arduino Programming Workshop 2
 Among different sizes of LCDs (16x1, 16x2, 16x4, 20x4), 16x2 LCD display
is very basic module and is very commonly used in various devices and circuits.

 A 16x2 LCD means it can display 16 characters per line and there are 2 such
lines. In this LCD each character is displayed in 5x7 pixel matrix.

 The 16x2 intelligent alphanumeric dot matrix display is capable of displaying


224 different characters and symbols.

 This LCD has two registers, namely, Command and Data.


 Command register stores various commands given to the display.
 Data register stores data to be displayed.
DAY-2 Session-1 Arduino Programming Workshop 3
 Vss- Ground pin
 Vcc- Supply (+5V)
 VEE- Contrast pin (0.4 to 0.9V)
 RS- Register select (1- data register, 0 – command register)
 R/W - Read/ Write mode ( 1-Read mode, 0- Write mode)
 E- Enable the LCD module (high to low at this pin enable LCD)
 DB0-DB7- Data pins (command and data are send to display)
 LED+ & LED- - Anode and Cathode of backlight
DAY-2 Session-1 Arduino Programming Workshop 4
 This library allows an Arduino board to control LiquidCrystal displays (LCDs)
based on the Hitachi HD44780 chipset, which is found on most LCDs.
 In Arduino LiquidCrystal library is used #include <LiquidCrystal.h>
 The library works with in either 4- or 8-bit mode
 To use the LiquidCrystal library - create a named LiquidCrystal object.
 LiquidCrystal lcd(rs, enable, d4, d5, d6, d7);
 LiquidCrystal lcd(rs, rw, enable, d4, d5, d6, d7);
 LiquidCrystal lcd(rs, enable, d0, d1, d2, d3, d4, d5, d6, d7);
 LiquidCrystal lcd(rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
DAY-2 Session-1 5
 lcd.begin(cols, rows)-Initializes the interface to LCD, and specifies dimensions
 lcd.print(data)/lcd.write(data) - the character to write to the display
 lcd.clear()-Clears the LCD screen and positions the cursor on upper-left corner
 lcd.setCursor(col, row)- Position the LCD cursor
 lcd.leftToRight()-Set the direction for text written to the LCD to left-to-right
 lcd.scrollDisplayLeft()-Scrolls the contents of the display one space to the left
 lcd.blink()-Display the blinking LCD cursor.
 lcd.autoscroll()-Turns on automatic scrolling of the LCD
For other APIs Refer: https://www.arduino.cc/en/Reference/LiquidCrystal
DAY-2 Session-1 Arduino Programming Workshop 6
Display Name and Register number on LCD
Write a program for LCD to display your register number (ex.: 20BEC1001) at the
beginning first line 6th position and “VIT Chennai” at beginning of the second line 3rd
position. Simulate and verify this logic on Arduino Uno using Tinkercad circuits
simulator.

DAY-2 Session-1 Arduino Programming Workshop 7


Program & output
Design

DAY-2 Session-1 Arduino Programming Workshop 8


Display Name and Register number on LCD
Write a program for LCD to display your register number (ex.: 20BEC1001) at the
beginning first line 6th position and “VIT Chennai” at beginning of the second line 3rd
position. Simulate and verify this logic on Arduino Uno using Tinkercad circuits
simulator.

DAY-2 Session-1 Arduino Programming Workshop 9


Boiler temperature monitoring system
Write a program to design a boiler temperature monitoring system which
monitor the temperature using TMP36 sensor and display its value on LCD
display.
 Temperature of the boiler must be maintained between 25°C to 30°C. Whenever the
boiler temperature is below 25°C or above 30°C the system must alarm using buzzer.
 Display current temperature value on the first line of the LCD.
 In the LCD second line, display “Normal Temp.” if the temperature is between 25°C to
30°C. Display “High Temp.” when the temperature is above 30°C. Display “Low Temp.”
when the temperature is below 25°C.
Simulate and verify this logic on Arduino Uno using Tinkercad circuits simulator.

DAY-2 Session-1 Arduino Programming Workshop 10


 A keypad is a set of buttons or keys bearing digits, symbols and/or
alphabetical letters which can be used as an efficient input device.

 A keypad may be purely numeric, as that found on a calculator or a digital


door lock, or alphanumeric as those used on cellular phones.

 4x4 Matrix keypad is most commonly used keypad in many embedded


applications.

 Keypads are organized in a matrix of rows and columns.

 When a key is pressed, a row and a column make a contact Otherwise; there
is no connection between rows and columns.
DAY-2 Session-1 Arduino Programming Workshop 11
STEP-1

STEP-2

STEP-3

STEP-4
DAY-2 Session-1 Arduino Programming Workshop 12
 “Keypad” is a library for using matrix style keypads with the Arduino and
supports multiple keypresses.
 In Arduino keypad library is used with header file #include <Keypad.h>

 Keypad(makeKeymap(userKeymap), row[], col[], rows, cols)

- Instantiates a Keypad object that uses pins 0,1,2,3s row pins, and 4,5,6,7as column pins for 4x4 keypad
DAY-2 Session-1 Arduino Programming Workshop 13
 char waitForKey() - This function will wait forever until someone presses a key.
 char getKey() - Returns the key that is pressed, if any.
 KeyState getState()-Returns the current state of any of the keys. The four
states are IDLE, PRESSED, RELEASED and HOLD.
 boolean keyStateChanged() – Let's you know when the key has changed from
one state to another.
 setDebounceTime(unsigned int time) - Set the amount of milliseconds the
keypad will wait until it accepts a new keypress/keyEvent.
 addEventListener(keypadEvent) - Trigger an event if the keypad is used.
For other APIs Refer: https://playground.arduino.cc/Code/Keypad/#Functions

DAY-2 Session-1 Arduino Programming Workshop 14


Read the input from keypad and display it in LCD

Write a program to accepts input from a 4x4 keypad and displays it on the LCD.
Assume LCD operates in 4-bit with EN and RS active state. Simulate and verify this
logic on Arduino Uno using Tinkercad circuits simulator.

DAY-2 Session-1 Arduino Programming Workshop 15


Program & output
Design

DAY-2 Session-1 Arduino Programming Workshop 16


Password based door locking system
Write a program to design a password based door locking system in which the system
accept 4-digit password (last 4-digit of your reg. no) via keypad and activate the DC
motor to open the door. Also use the LCD display to message based on correctness of
the password. Use * symbol to represent password on LCD. Simulate and verify this
logic on Arduino Uno using Tinkercad circuits simulator.

DAY-2 Session-1 ECE4003-Embedded System Design Lab 17


 Biometric attendance system

 Token display system

 Wireless electronic notice board

 Calculator

 ATM Machine

DAY-4 Arduino Programming Workshop 18

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