int buz=7;
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=4; i>0; i--){
if(i%2==0){
digitalWrite(i, HIGH);
}else{
digitalWrite(i, LOW);
}
}
tone(buz,270);//noTone(buz); #for off or no sound
delay(3000);//milisecond
for( int i=4; i>0; i--){
if(i%2!=0){
digitalWrite(i, HIGH);
}else{
digitalWrite(i, LOW);
}
}
tone(buz,670);//noTone(buz); #for off or no sound
delay(3000);//milisecond
}