0% found this document useful (0 votes)
26 views1 page

Arduino Sketch Code Wihtout Keypad

This Arduino sketch code displays text on an LCD screen connected to an Arduino board without using a keypad. It initializes the LCD screen, prints some test text, and then enters a loop where it reads serial input from the computer and displays each character on the LCD at the cursor position, returning to the start after the last position is reached.

Uploaded by

Elangovan N
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)
26 views1 page

Arduino Sketch Code Wihtout Keypad

This Arduino sketch code displays text on an LCD screen connected to an Arduino board without using a keypad. It initializes the LCD screen, prints some test text, and then enters a loop where it reads serial input from the computer and displays each character on the LCD at the cursor position, returning to the start after the last position is reached.

Uploaded by

Elangovan N
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/ 1

Arduino Sketch Code wihtout Keypad

#include <LiquidCrystal.h> //Import Code Library


 
1
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
2
 
3
int serial_in;
4
 
5
void setup()
6
{
7
lcd.begin(16,2);                            // Dimention of the LCD
8
lcd.print(” www.14core.com“); // display text to the LCD
9
lcd.setCursor(0,1);  // To set lcd.setCursor (column,row)
10
lcd.print(”Testing the Code below”);
11
delay(3000);
12
lcd.clear();
13
lcd.setCursor(0,0);
14
Serial.begin(9600); // Opening the serial port baud rate 9600 baud rate
15
}
16
void loop()
17
{
18
for (int lcd_cursor=0; lcd_cursor<32; lcd_cursor++)
19
{
20
if (lcd_cursor == 15) lcd.setCursor(0,1);
21
else if (lcd_cursor == 31) lcd.home();
22
while (!Serial.available()); // wait until there is signal  from computer
23
serial_in = Serial.read(); // Receive signal in ASCII
24
lcd.write(serial_in);
25
}
26
}
27
28

You might also like