0% found this document useful (0 votes)
15 views2 pages

Kode Arduino untuk LCD I2C

The document contains an HTML page with Arduino code for controlling an I2C LCD display. It initializes the LCD and displays various messages with specified delays. The code includes setup and loop functions to manage the display output.

Uploaded by

gilakk74
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Kode Arduino untuk LCD I2C

The document contains an HTML page with Arduino code for controlling an I2C LCD display. It initializes the LCD and displays various messages with specified delays. The code includes setup and loop functions to manage the display output.

Uploaded by

gilakk74
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

<!

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 &lt;LiquidCrystal_I2C.h&gt;

// 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>

You might also like