Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino Leonardo Controlled I2C LCD Display for Text Scrolling

View and Edit Project In Cirkit DesignerImage of Arduino Leonardo Controlled I2C LCD Display for Text Scrolling

Circuit Documentation

Summary of the Circuit

This circuit consists of an Arduino Leonardo (Rev3b) microcontroller, an I2C LCD 16x2 Screen, and a 5V battery. The Arduino Leonardo is responsible for controlling the LCD screen to display scrolling text. The LCD screen is connected to the Arduino via the I2C communication protocol, using the SDA and SCL lines. The 5V battery provides power to the Arduino, which in turn powers the LCD screen. The ground connections are shared between the Arduino, the LCD screen, and the battery to complete the circuit.

Component List

Arduino Leonardo (Rev3b)

I2C LCD 16x2 Screen

5V Battery

Wiring Details

Arduino Leonardo (Rev3b)

I2C LCD 16x2 Screen

5V Battery

Documented Code

/*
 * This Arduino sketch interfaces with a 16x2 I2C LCD screen to display
 * running text. The text will scroll from right to left continuously.
 */

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

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

void setup() {
  // Initialize the LCD
  lcd.begin();
  // Turn on the backlight
  lcd.backlight();
  // Print initial message
  lcd.print("IOT BASED URBAN WATER DISTRUBUTION SYSTEM");
}

void loop() {
  // Scroll the text to the left
  lcd.scrollDisplayLeft();
  // Wait for 300 milliseconds
  delay(300);
}

Filename: sketch.ino

Description: The code initializes a 16x2 I2C LCD screen with the address 0x27. In the setup() function, the LCD is initialized, the backlight is turned on, and an initial message is displayed. The loop() function continuously scrolls the text to the left with a delay of 300 milliseconds between each scroll.