#include <LiquidCrystal_I2C.h>
#include "DHTesp.h"

LiquidCrystal_I2C lcd(0x27, 16, 2);
const int soilMoisturePin = 34; // untuk sensor kelembaban tanah
const int pHsensorPin = 35;      // untuk sensor pH tanah

void setup() {
  Serial.begin(115200);

  lcd.init();
  lcd.backlight();

  lcd.setCursor(2,0);
  lcd.setCursor(0,1);
}

void loop() {
  // sensor kelembaban tanah (simulasi)
  int soilMoisture = 400; // Nilai kelembapan tanah

  // sensor pH tanah (simulasi)
  float pHValue = 13.60; // Nilai ph

  Serial.println("Kelembaban Tanah: " + String(soilMoisture));
  Serial.println("Nilai pH Tanah: " + String(pHValue));
  Serial.println("---");

  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Kelembaban: " + String(soilMoisture));
  lcd.setCursor(0,1);
  lcd.print("pH: " + String(pHValue));
  delay(2000);
}