#include <LiquidCrystal.h>
#include "DHTesp.h"
#include <LiquidCrystal_I2C.h>
const int DHT_PIN = 23;
LiquidCrystal_I2C lcd(0x27, 16,2);
DHTesp dhtSensor;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("FAKHRUR RAFIF 2204026");
dhtSensor.setup(DHT_PIN, DHTesp::DHT22);
lcd.init();
lcd.backlight();
lcd.setCursor(0,1);
lcd.print("Tes Sensor DHT22");
}
void loop() {
// put your main code here, to run repeatedly:
TempAndHumidity data = dhtSensor.getTempAndHumidity();
Serial.println("3078");
Serial.println("2.5V");
Serial.println();
lcd.clear();
lcd.setCursor(0,0);
lcd.print("FAKHRUR");
lcd.setCursor(9,0);
lcd.print("2204026");
lcd.setCursor(0,1);
lcd.print((char)223);
lcd.print("3078");
lcd.setCursor(10,1);
lcd.print("2.5V");
delay(10000); // Wait for a new reading from the sensor (DHT22 has ~0>5Hz sample rate)
}