#define SPEAKER_PIN (8)
void setup()
{
pinMode(SPEAKER_PIN, OUTPUT);
// delay(1000); // needed for simulation only because the first call to tone takes time to start
for (uint8_t i = 0; i < 3; i++) {
tone(SPEAKER_PIN, 440);
delay(500);
noTone(SPEAKER_PIN);
delay(500);
}
}
void loop()
{
}