int b = 9; //create buzzer object and label it as b
void setup() { // setup code, to run once
pinMode(b, OUTPUT); //tell the arduino to output signal to the buzzer
}// end setup code
void loop() { //loop that will run repeatedly
tone(b, 400, 1000); //play a tone
delay(700); //wait 700 miliseconds
tone(b, 600, 1000);
delay(700);
tone(b, 800, 1000);
delay(700);
tone(b, 600, 1000);
delay(700);
tone(b, 400, 1000);
delay(700);
}
Comments
Please log in or sign up to comment.