Ks0138 keyestudio EASY plug I2C 2004 LCD

From Keyestudio Wiki
Jump to navigation Jump to search

EASY plug I2C 2004 LCD


thumb

Introduction

Keyestudio Easy-plug 2004 I2C Module is a 20 character by 2 line LCD display with Blue background and White backlight. The original 2004 LCD needs 7 IO ports to be up and running, ours is built with Arduino IIC/I2C interface, saving you 5 IO ports. In Easy-plug control board, one IIC interface will suffice. This LCD is ready-to-use because it is compatible with the Arduino Liquid Crystal Library.
Note: this module needs to be used together with EASY plug control board.


Specification

  • Interface: Easy-plug
  • Communication protocol: I2C
  • I2C address: 0x27
  • Operating voltage: +5V
  • Contrast control: through potentiometer
  • Size: 98mm*36mm
  • Weight: 30g

Connection Diagram

This module carries I2C interface, so we need to comply with I2C protocol in usage and corresponding head files must be included and added into the library.
Below is the connection diagram between this module and Easy-plug controller:

thumb


Sample Code

Download the libraries of Wire and LiquidCrystal_I2C: [1]

//KEYES
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,20,4);  // 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("Hello,keyestudio!");
   lcd.setCursor(0,2);
  lcd.print("Arduino LCM IIC 2004");
   lcd.setCursor(2,3);
  lcd.print("Power By Ec-yuan!");
}
void loop()
{
}

Note: To ensure that this module will work properly, these two head files, namely Wire and LiquidCrystal_I2C, must be added into our library before code testing.

Resources

PDF:

https://drive.google.com/open?id=18o4KCjIRKHqUnFCnL6W5_-0iPVyLU7dL

Download the Libraries of Wire and LiquidCrystal_I2C:

https://drive.google.com/open?id=1cwccbgOaC-CjFTZ17-sIDUxxHKt9VOt-

Buy From

Official Website

http://www.keyestudio.com/keyestudio-easy-plug-i2c-2004-lcd-module-for-arduino.html