Arduino LCD 16x2 Display Guide

This guide explains how to display "Welcome to Fab Academy" on a 16x2 LCD using an Arduino and the Adafruit_LiquidCrystal library.

1. Required Components

2. Wiring Instructions

LCD Pin Arduino Pin
VCC 5V
GND GND
SDA A4 (Uno) / 20 (Mega)
SCL A5 (Uno) / 21 (Mega)

3. Arduino Code

#include <Adafruit_LiquidCrystal.h>

int seconds = 0; 
Adafruit_LiquidCrystal lcd_1(0);

void setup() {
    lcd_1.begin(16, 2);
    lcd_1.print("Welcome to Fab");
    lcd_1.setCursor(0, 1);
    lcd_1.print("Academy");
    delay(2000);
    lcd_1.clear();
}

void loop() {
    lcd_1.setCursor(0, 0);
    lcd_1.print("Time (sec): ");
    lcd_1.setCursor(11, 0);
    lcd_1.print(seconds);
    
    lcd_1.setBacklight(1);
    delay(500);
    lcd_1.setBacklight(0);
    delay(500);
    
    seconds++;
}
    

4. Explanation

Embedded 1
16x2 LCD Display with Arduino

This image shows a 16x2 LCD Display connected to an Arduino, demonstrating basic display functionalities.