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

Arduino LCD Hello World Example

This document contains an Arduino sketch that initializes a 16x2 LCD display using the LiquidCrystal_I2C library. It displays the messages 'Hello World!' and 'Jairo' on the LCD with a delay between each character. The program includes cursor positioning, clearing the display, and backlight control for the LCD.

Uploaded by

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

Arduino LCD Hello World Example

This document contains an Arduino sketch that initializes a 16x2 LCD display using the LiquidCrystal_I2C library. It displays the messages 'Hello World!' and 'Jairo' on the LCD with a delay between each character. The program includes cursor positioning, clearing the display, and backlight control for the LCD.

Uploaded by

Jairo Daquioag
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

#include <Wire.

h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars
and 2 line display

void setup()
{
[Link](); // initialize the lcd
[Link](); // Turn on the LCD screen backlight
}

void loop()
{
char arr[] = "Hello World!"; // Let the compiler determine the size automatically
char arr1[] = "Jairo";
int stringLength = strlen(arr);
int strlngth = strlen(arr1);

for (int i = 0; i < stringLength; i++) {


[Link](i, 0); // Set cursor position for each character
[Link](arr[i]);
delay(100); // Reduce delay for faster display
}
delay(1000);
[Link]();
delay(2000);

for (int j = 0; j < strlngth; j++) {


[Link](j, 0); // Set cursor position for each character
[Link](arr1[j]);
delay(100); // Reduce delay for faster display
}
delay(1000);
[Link]();
delay(2000);
}

You might also like