Circuit Documentation
Summary
This circuit consists of an Arduino UNO microcontroller, a red LED, a piezo buzzer, and two resistors. The Arduino UNO controls the LED and the piezo buzzer. The LED is connected through a resistor to limit the current, and the piezo buzzer is also connected through a resistor to the Arduino.
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: anode and cathode.
- Pins: cathode, anode
Resistor
- Description: A resistor used to limit current.
- Pins: pin1, pin2
- Properties:
- Resistance: NaN Ohms
Piezo Buzzer
- Description: A piezoelectric buzzer.
- Pins: pin 1, pin 2
Resistor
- Description: A resistor used to limit current.
- Pins: pin1, pin2
- Properties:
- Resistance: NaN Ohms
Wiring Details
Arduino UNO
- 5V is connected to pin 1 of the Piezo Buzzer.
- GND is connected to the cathode of the LED.
- D11 is connected to pin2 of the Resistor (connected to the LED).
LED: Two Pin (red)
- cathode is connected to GND of the Arduino UNO.
- anode is connected to pin1 of the Resistor (connected to D11 of the Arduino UNO).
Resistor (connected to LED)
- pin1 is connected to the anode of the LED.
- pin2 is connected to D11 of the Arduino UNO.
Piezo Buzzer
- pin 1 is connected to 5V of the Arduino UNO.
- pin 2 is connected to pin1 of the Resistor (connected to the Piezo Buzzer).
Resistor (connected to Piezo Buzzer)
- pin1 is connected to pin 2 of the Piezo Buzzer.
- pin2 is not connected to any other component.
Code Documentation
Arduino UNO Code
int led = 11;
int buzzer = 10;
void setup() {
// put your setup code here, to run once:
pinMode(led, OUTPUT);
pinMode(buzzer, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
}
This code initializes pin 11 as an output for the LED and pin 10 as an output for the buzzer. The setup() function runs once when the microcontroller is powered on or reset, and the loop() function runs continuously. Currently, the loop() function is empty, meaning no actions are performed repeatedly.
