int sens = 27;
int LED = 14;
int sensor;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
//Serial.println("Hello, ESP32!");
pinMode(LED, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
sensor = analogRead(sens);
Serial.println(sensor);
if(sensor<300){
digitalWrite(LED, HIGH);
}
else{
digitalWrite(LED, LOW);
}
delay(10); // this speeds up the simulation
}