<!
DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Kode Arduino LCD I2C</title>
<style>
body {
font-family: monospace, monospace;
background-color: #f4f4f4;
padding: 20px;
}
pre {
background-color: #272822;
color: #f8f8f2;
padding: 15px;
border-radius: 5px;
overflow-x: auto;
}
</style>
</head>
<body>
<h1>Kode Arduino LCD I2C</h1>
<pre><code>
#include <LiquidCrystal_I2C.h>
// Alamat I2C biasanya 0x27 atau 0x3F, sesuaikan dengan modul Anda
LiquidCrystal_I2C lcd_1(0x27, 16, 2);
void setup()
{
lcd_1.init();
lcd_1.backlight();
lcd_1.clear();
lcd_1.setCursor(0, 0);
}
void loop()
{
lcd_1.setCursor(0, 0);
lcd_1.print("sudah terbiasa");
delay(1000);
lcd_1.setCursor(0, 1);
lcd_1.print("terjadi tantee");
delay(2000);
lcd_1.clear();
lcd_1.setCursor(0, 0);
lcd_1.print("teman datang");
delay(1000);
lcd_1.setCursor(0, 1);
lcd_1.print("ketika lagi");
delay(1000);
lcd_1.clear();
lcd_1.setCursor(0, 0);
lcd_1.print("butuh saja");
delay(2000);
lcd_1.setCursor(0, 0);
lcd_1.print("coba kalau");
delay(1000);
lcd_1.setCursor(0, 1);
lcd_1.print("lagi susahh");
delay(2000);
lcd_1.clear();
lcd_1.setCursor(0, 0);
lcd_1.print("mereka semua");
delay(1000);
lcd_1.clear();
lcd_1.setCursor(0, 1);
lcd_1.print("menghilanggg");
delay(5000);
lcd_1.clear();
lcd_1.setCursor(0, 0);
lcd_1.print("tanteeee");
delay(3000);
lcd_1.setCursor(0, 1);
lcd_1.print("tanteee");
delay(10000);
}
</code></pre>
</body>
</html>