Activity 3 Alarm Clock

mail@pastecode.io avatar
unknown
c_cpp
a month ago
377 B
1
Indexable
Never
void setup() {
  // put your setup code here, to run once:
pinMode(13,OUTPUT); //set pin 13 to output
for(int i=0; i<10; i++){ //repeat loop 10 times
tone(13,400); //play frequency of 400
delay(1500); //wait 1.5 seconds
noTone(13); //stop music
delay(1500); //wait 1.5 seconds
} //repeat loop
}

void loop() {
  // put your main code here, to run repeatedly:

}
Leave a Comment