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.
DFR0555_Display.gif

Specification

Board Overview

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

Sample Code

Download DFRobot LCD Library How to install Libraries in Arduino IDE

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

#include <Wire.h>
#include "DFRobot_LCD.h"

DFRobot_LCD lcd(16,2);  //16 characters and 2 lines of show

void breath(unsigned char color){
    for(int i=0; i<255; i++){
        lcd.setPWM(color, i);
        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(REG_ONLY);
}

Expected Results

FAQ

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

More Documents