void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT);
}
int d = 0;
int f = 0;
void loop() {
d = random(30,50);
f = random(200,8000);
tone(2,f);
delay(d);
noTone(2);
delay(d);
// put your main code here, to run repeatedly:
}