#define POTENTIOMETER_PIN 35
#define BUZZER_PIN 21
#define ANALOG_THRESHOLD 1000
void setup() {
pinMode(BUZZER_PIN, OUTPUT);
Serial.begin(9600);
}
void loop() {
int analogValue = analogRead(POTENTIOMETER_PIN);
if (analogValue > ANALOG_THRESHOLD) {
digitalWrite(BUZZER_PIN, HIGH);
Serial.println("Buzzer is ON");
} else {
digitalWrite(BUZZER_PIN, LOW);
Serial.println("Buzzer is OFF");
}
delay(100);
}