Pemograman LCD 16x2 I2C Menggunakan Arduino Uno
Daftar Komponen:
1. Arduino Uno
2. LCD 16x2 i2c
3. Kabel Jumper Dupont Male - Female
Langkah kerja:
- Hubungkan modul Arduino Uno, LCD 16x2 I2C menggunakan Kabel Jumper Male - Female seperti berikut:
- Code
#include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display void setup() { lcd.init(); // initialize the lcd lcd.init(); // Print a message to the LCD. lcd.backlight(); lcd.setCursor(1,0); lcd.print("hello guys"); lcd.setCursor(1,1); lcd.print("LCD i2c"); } void loop() { }
- Library Liquid Crystal I2C, download disini, atau cara cepat install library menggunakan Librari Manager, masukan kata LiquidCrystal_I2C pada pencarian