/*
* LAB: 15
* Name: ESP32 LCD 16x2 Without I2C - Scrolling Text
* Author: Khaled Magdy
* For More Info Visit: www.DeepBlueMbedded.com
*/
#include <LiquidCrystal.h>
// Create An LCD Object. Signals: [ RS, EN, D4, D5, D6, D7 ]
LiquidCrystal My_LCD(13, 12, 11, 10, 9, 46);
void setup()
{
// Initialize The LCD. Parameters: [ Columns, Rows ]
My_LCD.begin(16, 2);
// Clears The LCD Display
My_LCD.clear();
// Display The First Message In Home Position (0, 0)
My_LCD.print("Corinna");
// Set The Cursor Position To: [ Col 0, Row 1]
// The Next Message Will Start From The 1st Char Position in The 2nd Row
// Note: 1st Row Has An Index of 0, The 2nd Row Has An Index of 1
My_LCD.setCursor(0, 1);
// Display The Second Message In Position (0, 1)
My_LCD.print("my LOVE");
}
void loop()
{
// Shift The Entire Display To Right 7 Times
for(int i=0; i<9; i++)
{
My_LCD.scrollDisplayRight();
delay(500);
}
// Shift The Entire Display To Left 7 Times
for(int i=0; i<9; i++)
{
My_LCD.scrollDisplayLeft();
delay(200);
}
}Loading
esp32-s3-devkitc-1
esp32-s3-devkitc-1