/* LED and Buzzer Circuit Connections: PIN_0 => LED_Anode - LED_Cathode = > Resistor 220Ω => Gnd PIN_4 => Buzzer_Positive - Buzzer_Negative = > Resistor 100Ω => Gnd */ //The setup() function initializes and sets the initial values //It will only run once after each powerup or reset void setup() { //Configures the PIN_0 and the PIN_4 to behave as outputs pinMode(0, OUTPUT); pinMode(4, OUTPUT); //complete the line } //This function loops consecutively void loop() { digitalWrite(0, LOW); //Write a LOW value (0V) to digital pin 0 – LED off digitalWrite(4, HIGH); //Write a HIGH value (5V) to digital pin 4 – Buzzer on delay(2500); // Pauses the program for 2500 milliseconds digitalWrite(0, HIGH); //Write a HIGH value (5V) to digital pin 0 – LED on digitalWrite(4, LOW); //Write a LOW value (0V) to digital pin 4 – Buzzer off delay(2500); // Wait for 2500 milliseconds }