int buz=13;
void setup() {
// put your setup code here, to run once:
for(int i=1; i<5; i++){
pinMode(i, OUTPUT);
}
pinMode(buz, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
for( int i=1; i<9; i++)
{
digitalWrite(i, HIGH);
tone(buz,210 +(30*i));//noTone(buz); #for off or no sound
delay(10);//milisecond
// digitalWrite(i, LOW);
}
for( int i=1; i<9; i++)
{
digitalWrite(i, LOW);
tone(buz,500 -(50*i));//noTone(buz); #for off or no sound
delay(10);//milisecond
// digitalWrite(i, LOW);
}
}