Circuit Documentation
Summary
This circuit consists of an Arduino UNO microcontroller, two red LEDs, and a resistor. The Arduino UNO controls the LEDs, making them blink alternately. The resistor is used to limit the current flowing through the LEDs to prevent damage.
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
Resistor
- Description: A passive electrical component that implements electrical resistance as a circuit element.
- Pins: pin1, pin2
- Properties:
- Resistance: 200 Ohms
LED: Two Pin (red)
- Description: A light-emitting diode that emits red light.
- Pins: cathode, anode
LED: Two Pin (red)
- Description: A light-emitting diode that emits red light.
- Pins: cathode, anode
Wiring Details
Arduino UNO
- GND: Connected to pin1 of the Resistor.
- D13: Connected to the anode of the first LED.
- D8: Connected to the anode of the second LED.
Resistor
- pin1: Connected to GND of the Arduino UNO.
- pin2: Connected to the cathodes of both LEDs.
LED: Two Pin (red)
- Anode: Connected to D13 of the Arduino UNO.
- Cathode: Connected to pin2 of the Resistor.
LED: Two Pin (red)
- Anode: Connected to D8 of the Arduino UNO.
- Cathode: Connected to pin2 of the Resistor.
Code Documentation
Arduino UNO Code
void setup() {
// Initialize digital pins D13 and D8 as outputs
pinMode(13, OUTPUT);
pinMode(8, OUTPUT);
}
void loop() {
// Turn on LED connected to D13 and turn off LED connected to D8
digitalWrite(13, HIGH);
digitalWrite(8, LOW);
delay(500); // Wait for 500 milliseconds
// Turn off LED connected to D13 and turn on LED connected to D8
digitalWrite(13, LOW);
digitalWrite(8, HIGH);
delay(500); // Wait for 500 milliseconds
}
This code initializes the digital pins D13 and D8 as outputs. In the main loop, it alternates turning on and off the LEDs connected to these pins with a delay of 500 milliseconds.
