Arduino: LCD 1602 I2C

From OnnoWiki
Revision as of 17:27, 1 April 2023 by Onnowpurbo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
DHT11 Dan LCD i2C bb.png

Download Library

https://github.com/johnrickman/LiquidCrystal_I2C

Copy file zip ke

mv *zip ~/Arduino/library/

Code

/*
 * Sambungan di Arduino UNO
 * SDA - pin SDA
 * SCL - pin SCL
 */

#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
  lcd.init();
  lcd.backlight();
  lcd.backlight();
  lcd.setCursor(0,0);
  lcd.print("TEST LCD I2C");
  lcd.setCursor(0,1);
  lcd.print("Hello World!");
}

void loop(){
}