// speaker ada di pin 9 
const int pinSpeaker = 9; 
// delay untuk nada 440 Hz 
const int timeDelay = 1163; 

void setup() { 
pinMode(pinSpeaker, OUTPUT); 
} 

void loop() { 
digitalWrite(pinSpeaker, HIGH); 
delayMicroseconds(timeDelay); 
digitalWrite(pinSpeaker, LOW); 
delayMicroseconds(timeDelay); 
}