5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10



Arduino Project: I2C 1602 LCD

Posted by Fiona Su on

thumb
Introduction:
1602 I2C module is a 16 character by 2 line LCD display with Blue background and White backlight. The original 1602 LCD needs 7 IO ports to be up and running, ours is built with Arduino IIC/I2C interface, saving you 5 IO ports. This LCD is ready-to-use because it is compatible with the Arduino Liquid Crystal Library.
Hardware required:

  • Arduino Board *1
  • USB Cable *1
  • I2C 1602 LCD *1
  • Breadboard *1
  • Male to Female Dupont Lines
  • Connection :

Connection for REV4:

thumb
Connection for 2560 R3:

thumb
Sample program:

#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()
{
lcd.init(); // initialize the lcd
lcd.init();
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(3,0);
lcd.print("Hello, world!");
lcd.setCursor(2,1);
lcd.print("keyestudio!");
}
void loop()
{
}

Result:
After connection and uploading sample code, the first line on LCD prints "Hello, world!", second line prints "keyestudio!", with a potentiometer to adjust LCD backlight.

thumb 

 

0 comments

Leave a comment

Please note, comments must be approved before they are published