int potenciometar;
int buzpin=8;
int potpin=A3;
void setup() {
// put your setup code here, to run once:
pinMode(buzpin, OUTPUT);
pinMode(potpin, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
potenciometar=analogRead(potpin);
if(potenciometar>1000)
{
digitalWrite(buzpin, HIGH);
delay(1000);
digitalWrite(buzpin,LOW);
}
}