Displaying Text On 16x2 LCD With Arduino
Displaying Text On 16x2 LCD With Arduino
A. LCD 16×2
The LCD 16×2 is most popular viewers used as an interface between
the microcontroller and its users. With LCD 16×2 viewer user can
monitor the state of the sensor or the state of the program. LCD 16×2
viewer can be connected to any microcontroller, such us ATMega32,
ATMega16 or ATMega8535 and ATMega 8.
(Ref: https://www.codepolitan.com/menampilkan-text-di-lcd-dengan-
arduino)
On the picture can be seen that the LCD 16×2 has 16 pins. The wiring
is as follows:
(Ref: https://www.codepolitan.com/menampilkan-text-di-lcd-dengan-
arduino)
(Ref: https://www.codepolitan.com/menampilkan-text-di-lcd-dengan-
arduino)
C. Arduino UNO
(Ref: https://www.codepolitan.com/menampilkan-text-di-lcd-dengan-
arduino)
Connect the I2C module to Arduino UNO, Make sure all cables are
connected properly. If it is correct, the next step, processing of making
the program. Well before starting to make the program, we must
download the library first.
Next, creating a program in the Arduino IDE app and write the
program as below:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
void setup ()
{
lcd.begin (16,2);
}
void loop ()
{
lcd.setBacklight (HIGH);
lcd.setCursor (0,0);
lcd.print ("EGI ANUGRAH");
lcd.setCursor (0,1);
lcd.print ("CODEPOLITAN");
delay (1000);
lcd.setBacklight (HIGH);
delay (1000);
}