Gravity_I2C_LCD1602_Arduino_LCD_Display_Module_SKU_DFR0555_DF0556_DFR0557-DFRobot

DFR0557/DFR0556/DFR0555 Gravity I2C LCD1602 Arduino LCD Display Module

Introduction

Referring to the LCD16020, I believe that everyone is not unfamiliar the square shape, green color, a row of 2.54 pin header.... LCD1602 module is a product of the DFRobot Gravity IIC series, which has been greatly optimized for its original LCD1602 appearance. This module does not need to adjust the contrast, retain the backlight controllable function, simultaneously compatible with 3.3V and 5V voltage. The optimization of function and the appearance brings you the different experience. This kind of module has the blue screen, the green screen, the gray screen.

Specification

Board Overview

DFR0557/DFR0556/DFR0555 Gravity I2C LCD1602 Arduino LCD Display Module Board Overview
Num Label Description
1 VCC 3.3~5V
2 GND GND
3 SCL IIC_Clock
4 SDA IIC_Data

Tutorial

Follow the pin description to connect the hardware, then download the sample code to UNO. After upload finished, you can see the LCD display and backlight gradient effect.

Requirements

Connection Diagram

DFR0557/DFR0556/DFR0555 Gravity I2C LCD1602 Arduino LCD Display Module Connection Diagram

Sample Code

Download DFRobot LCD Library How to install Libraries in Arduino IDE

/*!
  * file Fade.ino
  * brief Fade.
  *
  * Copyright  [DFRobot](https://www.dfrobot.com), 2016
  * Copyright GNU Lesser General Public License
  *
  * version  V1.0
  * date  2018-1-13
  */

#include "DFRobot_RGBLCD1602.h"

/*
Change the RGBaddr value based on the hardware version
-----------------------------------------
       Moudule        | Version| RGBAddr|
-----------------------------------------
  LCD1602 Module      |  V1.0  | 0x60   |
-----------------------------------------
  LCD1602 Module      |  V1.1  | 0x6B   |
-----------------------------------------
  LCD1602 RGB Module  |  V1.0  | 0x60   |
-----------------------------------------
*/

DFRobot_RGBLCD1602 lcd(/*RGBAddr*/0x6B ,/*lcdCols*/16,/*lcdRows*/2);  //16 characters and 2 lines of show

void breath(unsigned char color){
    for(int i=0; i<255; i++){
        lcd.setPWM(color, i);  // 调节背光亮度,0为关闭
        delay(5);
    }

    delay(500);
    for(int i=254; i>=0; i--){
        lcd.setPWM(color, i);
        delay(5);
    }

    delay(500);
}

void setup() {
    // initialize
    lcd.init();
    // Print a message to the LCD.
    lcd.setCursor(4, 0);
    lcd.print("DFRobot");
    lcd.setCursor(1, 1);
    lcd.print("lcd1602 module");
}

void loop() {

     breath(lcd.REG_ONLY);
}

Expected Results

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents