Introduction
Have you been fed up with Black/White LCD screen? Do you want to try a colorful one? DFRobot I2C 16x2 Arduino LCD with RGB Backlight Display module will bring you a new experience about screen. It comes with RGB full color backlight, which has 16 million kinds of color. Usually, Arduino LCD display projects will run out of pin resources easily, especially with Arduino Uno. And it is also very complicated with the wire soldering and connection. This I2C 16x2 LCD Screen is using an I2C communication interface. It means it only needs 4 pins for the LCD display: VCC, GND, SDA, SCL. It will saves at least 4 digital / analog pins on Arduino. And Gravity interface make it easier to use with our Gravity: IO expansion shield.
Specification
- Operating Voltage: 3.3V ~ 5.0V
- Operating Current: ≤60mA
- Display: 16 * 2
- Communication: IIC / I2C
- Backlight: RGB adjustable backlight (16 million)
- Operating Temperature: -20 to 70 ℃
- Storage Temperature: -30 to 80 ℃
- Dimension: 87.0 * 32.0 * 13.0mm/3.42 * 1.26 * 0.51 inches
Board Overview
Num | Label | Description |
---|---|---|
1 | VCC | 3.3~5.0V |
2 | GND | GND |
3 | SCL | I2C-SCl |
4 | SDA | I2C- SDA |
Tutorial
In this section, we 'll demonstrate a fade effect with different color.
Requirements
Hardware
- DFRduino UNO (or similar) x 1
- Gravity IO expansion Shield x1
- Gravity: I2C LCD1602 RGB Backlight Module x1
- M-M/F-M/F-F Jumper wires
Software
- Arduino IDE, Click to Download Arduino IDE from Arduino®
Connection Diagram
Sample Code
Please download the LCD library: DFRobot RGB LCD. How to install Libraries in Arduino IDE
/*!
* file SetColor.ino
* brief SetColor.
* @n This example Set the volume size and play music snippet.
*
* Copyright [DFRobot](https://www.dfrobot.com), 2016
* Copyright GNU Lesser General Public License
*
* version V1.0
* date 2017-2-10
*/
#include <Wire.h>
#include "DFRobot_RGBLCD.h"
int r,g,b;
int t=0;
DFRobot_RGBLCD lcd(16,2); //16 characters and 2 lines of show
void setup() {
Serial.begin(9600);
// initialize
lcd.init();
}
void loop() {
r= (abs(sin(3.14*t/180)))*255; //get R,G,B value
g= (abs(sin(3.14*(t 60)/180)))*255;
b= (abs(sin(3.14*(t 120)/180)))*255;
t=t 3;
lcd.setRGB(r, g, b); //Set R,G,B Value
lcd.setCursor(0,0);
lcd.print("DFRobot");
lcd.setCursor(0,1);
lcd.print("Gravity: RGB LCD");
//R:0-255 G:0-255 B:0-255
delay(1);
}
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum. |
---|
More Documents
- [LCD1602 RGB Backlight Module Datasheet](https://github.com/DFRobot/DFRobot_RGBLCD/raw/master/DFR0464 Datasheet.pdf)
- Arduino Library (Github Repository)
Get Gravity: I2C 16x2 Arduino LCD with RGB Backlight Display from DFRobot Store or DFRobot Distributor.