Anak Kendali
3 min readMar 6, 2021

--

Tutorial Arduino Antarmuka LCD 16x2 Dengan dan Tanpa Modul I2C

Membuat program dan rangkaian arduino dan LCD 16x2 tanpa modul I2C

Tutorial Arduino Antarmuka LCD 16x2 Dengan dan Tanpa Modul I2C
Tutorial Arduino Antarmuka LCD 16x2 Dengan dan Tanpa Modul I2C
#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 10, en = 9, d4 = 8, d5 = 7, d6 = 6, d7 = 5;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}

Membuat program dan rangkaian arduino dan LCD 16x2 dengan modul I2C

Tutorial Arduino Antarmuka LCD 16x2 Dengan dan Tanpa Modul I2C
Tutorial Arduino Antarmuka LCD 16x2 Dengan dan Tanpa Modul I2C
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup()
{
// initialize the LCD
lcd.begin();

// Turn on the blacklight and print a message.
lcd.backlight();
lcd.print("Hello, world!");
}

void loop()
{
// Do nothing here...
}

Keyword

--

--

Anak Kendali
0 Followers

Learn microcontroller with anakkendali.com