int count; void setup() { pinMode(0, OUTPUT); } void loop() { count = count+1; if(count<5) { tone(0,1471); delay(10); tone(0,1575); delay(5); } else { tone(0,1470); delay(10); tone(0,1575); delay(5); if(count>10) { count=0; } } }