#include <HCSR04.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
HCSR04 hc (5,6);
void setup()
{
lcd.begin(16,2);
lcd.backlight();
lcd.print("Jarak Objek :");
}
void loop() {
lcd.setCursor(0,1);
lcd.print(hc.dist());
lcd.print(" cm ");
delay(300);
}