Difference between revisions of "Arduino: LCD 1602 I2C"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (Created page with "Download Library https://github.com/johnrickman/LiquidCrystal_I2C Copy file zip ke mv *zip ~/Arduino/library/ Code #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C l...") |
Onnowpurbo (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[File:DHT11 Dan LCD i2C bb.png|center|400px|thumb]] | ||
+ | |||
Download Library | Download Library | ||
Line 9: | Line 11: | ||
Code | Code | ||
+ | /* | ||
+ | * Sambungan di Arduino UNO | ||
+ | * SDA - pin SDA | ||
+ | * SCL - pin SCL | ||
+ | */ | ||
+ | |||
#include <LiquidCrystal_I2C.h> | #include <LiquidCrystal_I2C.h> | ||
LiquidCrystal_I2C lcd(0x27, 16, 2); | LiquidCrystal_I2C lcd(0x27, 16, 2); | ||
void setup() { | void setup() { | ||
− | lcd. | + | 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(){ | void loop(){ | ||
− | |||
− | |||
− | |||
− | |||
} | } |
Latest revision as of 17:27, 1 April 2023
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(){ }