This circuit integrates an Arduino Leonardo with two LCD modules: a generic LCD 16x2 (Wokwi Compatible) and an LCM1602 IIC module. The Arduino Leonardo serves as the microcontroller, controlling the LCD displays via I2C communication. The LCM1602 IIC module is used as an interface between the Arduino and the generic LCD, facilitating easier communication through the I2C protocol. The circuit is designed to display text on the LCD screen.
GND
connected to LCM1602 IIC GND
5V
connected to LCM1602 IIC VCC
SDA
connected to LCM1602 IIC SDA
SCL
connected to LCM1602 IIC SCL
VSS
connected to LCM1602 IIC K
VDD
connected to LCM1602 IIC A
V0
connected to LCM1602 IIC D7
RS
connected to LCM1602 IIC D6
RW
connected to LCM1602 IIC D5
E
connected to LCM1602 IIC D4
D0
connected to LCM1602 IIC D3
D1
connected to LCM1602 IIC D2
D2
connected to LCM1602 IIC D1
D3
connected to LCM1602 IIC D0
D4
connected to LCM1602 IIC E
D5
connected to LCM1602 IIC RW
D6
connected to LCM1602 IIC RS
D7
connected to LCM1602 IIC V0
A
connected to LCM1602 IIC VDD
K
connected to LCM1602 IIC VSS
LED_A
connected to LED_B
(Backlight control)#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.begin();
}
void loop() {
lcd.setCursor(0, 0);
lcd.print("TEST LCD i2C");
lcd.setCursor(0, 1);
lcd.print("KelasRobot.com");
}
LiquidCrystal_I2C
library.lcd
object with the I2C address 0x27
for a 16x2 LCD.setup()
function, it begins communication with the LCD.loop()
function sets the cursor to the beginning of the first line and prints "TEST LCD i2C".