Circuit Documentation
Summary
This circuit consists of an Arduino UNO microcontroller, three LEDs (red, green, and yellow), and a buzzer. The Arduino UNO controls the LEDs and the buzzer, turning them on and off in a sequence. The LEDs are connected to digital pins D13, D12, and D11, while the buzzer is connected to digital pin D10.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
LED: Two Pin (red)
- Description: A red LED with two pins.
- Pins: cathode, anode
LED: Two Pin (green)
- Description: A green LED with two pins.
- Pins: cathode, anode
LED: Two Pin (yellow)
- Description: A yellow LED with two pins.
- Pins: cathode, anode
Buzzer
- Description: A simple buzzer with two pins.
- Pins: PIN, GND
Wiring Details
Arduino UNO
- 5V: Not connected to any component.
- GND: Connected to the GND pin of the buzzer, and the cathode pins of the red, green, and yellow LEDs.
- D13: Connected to the anode pin of the red LED.
- D12: Connected to the anode pin of the yellow LED.
- D11: Connected to the anode pin of the green LED.
- D10: Connected to the PIN of the buzzer.
LED: Two Pin (red)
- cathode: Connected to the GND pin of the Arduino UNO.
- anode: Connected to the D13 pin of the Arduino UNO.
LED: Two Pin (green)
- cathode: Connected to the GND pin of the Arduino UNO.
- anode: Connected to the D11 pin of the Arduino UNO.
LED: Two Pin (yellow)
- cathode: Connected to the GND pin of the Arduino UNO.
- anode: Connected to the D12 pin of the Arduino UNO.
Buzzer
- PIN: Connected to the D10 pin of the Arduino UNO.
- GND: Connected to the GND pin of the Arduino UNO.
Code Documentation
Arduino UNO Code
void setup() {
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT); // Buzzer pin
}
void loop() {
digitalWrite(13, HIGH);
delay(5000);
digitalWrite(13, LOW);
digitalWrite(10, LOW); // Turn off buzzer
delay(10);
digitalWrite(12, HIGH);
delay(5000);
digitalWrite(12, LOW);
delay(10);
digitalWrite(11, HIGH);
digitalWrite(10, HIGH); // Turn on buzzer
delay(5000);
digitalWrite(11, LOW);
digitalWrite(10, LOW); // Turn off buzzer
delay(10);
}
This code initializes the digital pins D13, D12, D11, and D10 as output pins. In the loop function, it turns on the red LED for 5 seconds, then turns it off. Next, it turns on the yellow LED for 5 seconds, then turns it off. Finally, it turns on the green LED and the buzzer for 5 seconds, then turns them off. This sequence repeats indefinitely.
