#include <Adafruit_Sensor.h>
#include <Adafruit_GFX.h>
#define SOIL_PIN 27
#define PH_PIN 26
String Soil_Status(int i){
String msg = i < 2165 ? "WET" : i > 3135 ? "DRY" : "GOOD";
return msg;
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(SOIL_PIN, INPUT);
pinMode(PH_PIN, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
int soilValue = analogRead(SOIL_PIN);
int phValue = analogRead(PH_PIN);
Serial.println(soilValue);
Serial.println(phValue);
delay(5000);
}