Bahan yang diperlukan:
- Arduino Uno
- LCD 16x2
- I2C
- Kabel Jumper
Gambar Rangkaian:
Library
Download disini
Sourcecode
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27 ,2,1,0,4,5,6,7,3, POSITIVE);
//Ubah alamat 0x27 dengan alamat i2C kamu
void setup(){
lcd.begin (16,2); //LCD untuk ukuran 16x2
}
void loop(){
lcd.setCursor(0, 0); //baris pertama
lcd.print("TEST LCD i2C");
lcd.setCursor(0, 1); //baris kedua
lcd.print("Hello World");
}

kalau di upload ada tilisan seperti ini
BalasHapusexit status 1
no matching function for call to 'LiquidCrystal_I2C::begin(int, int)'
download liberarynya dlu
HapusLiquidCrystal_I2C lcd(0x27 ,2,1,0,4,5,6,7,3, POSITIVE);
BalasHapusexit status 1
'POSITIVE' was not declared in this scope
sama seperti ini bigimini ya...