int potVal;
int potPin=A0;
int buzzPin=8;
int del=500;
void setup() {
// put your setup code here, to run once:
pinMode(buzzPin,OUTPUT);
pinMode(potPin,INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
potVal=analogRead(potPin);
Serial.println(potVal);
delay(200);
if (potVal>1000){
digitalWrite(buzzPin,HIGH);
delay(del);
digitalWrite(buzzPin,LOW);
delay(del);
}
}