#define pot 2
#define buzzer 12
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
// Serial.println("Hello, ESP32!");
}
void loop() {
int po=analogRead(pot);
Serial.println(po);
if(po > 2000){
digitalWrite(buzzer, HIGH);
}else{
digitalWrite(buzzer, LOW);
}
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}