const byte BUZZER_PIN = 12; const unsigned int NOTES[] = {523, 659, 784}; const unsigned long NOTE_MS = 300; const unsigned long GAP_MS = 200; void setup() { pinMode(BUZZER_PIN, OUTPUT); } void loop() { for (byte i = 0; i < 3; i++) { tone(BUZZER_PIN, NOTES[i]); delay(NOTE_MS); noTone(BUZZER_PIN); digitalWrite(BUZZER_PIN, LOW); delay(GAP_MS); } delay(500); }