int buzPin = 8;
int delayT = 1000;
int potPin = A1;
String msg1 = "Your voltage is: ";
int potVal ;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(buzPin, OUTPUT);
pinMode(potPin, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
potVal = analogRead(potPin);
Serial.print(msg1);
Serial.println(potVal);
if (potVal > 1000){
digitalWrite(buzPin, HIGH);
delay(delayT);
digitalWrite(buzPin, LOW);
}
}