int potPin=A3;
int potVal;
int buzzVal;
int buzzPin=10;
void setup() {
// put your setup code here, to run once:
pinMode(potPin, INPUT);
pinMode(buzzPin, OUTPUT);
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
potVal=analogRead(A3);
Serial.println(potVal);
buzzVal= 60 + (9940./1023)*potVal;
digitalWrite(buzzPin,HIGH);
delayMicroseconds(buzzVal);
digitalWrite(buzzPin, LOW);
delayMicroseconds(buzzVal);
}