Circuit Documentation
Summary of the Circuit
This circuit consists of an Arduino UNO microcontroller board and a two-pin red LED. The Arduino UNO is programmed to control the LED, turning it on and off at one-second intervals. The LED's anode is connected to a digital output pin (D13) on the Arduino, and the cathode is connected to the ground (GND) pin on the Arduino, completing the circuit.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D0-D13
- Purpose: Acts as the main controller for the circuit, driving the LED and managing the timing for turning the LED on and off.
LED: Two Pin (red)
- Description: A basic red light-emitting diode.
- Pins: cathode, anode
- Purpose: Emits light when powered, indicating the output state of the Arduino's digital pin.
Wiring Details
Arduino UNO
- GND: Connected to the cathode of the LED.
- D13: Connected to the anode of the LED.
LED: Two Pin (red)
- Cathode: Connected to the GND pin on the Arduino UNO.
- Anode: Connected to the D13 pin on the Arduino UNO.
Documented Code
// Filename: sketch.ino
void setup() {
pinMode(13, OUTPUT); // Set pin D13 as an output
}
void loop() {
digitalWrite(13, HIGH); // Turn the LED on
delay(1000); // Wait for a second
digitalWrite(13, LOW); // Turn the LED off
delay(1000); // Wait for a second
}
This code is written for the Arduino UNO microcontroller. In the setup() function, pin D13 is configured as an output. The loop() function then creates an infinite loop that turns the LED on by setting D13 high, waits for one second, turns the LED off by setting D13 low, and then waits for another second. This cycle repeats indefinitely, causing the LED to blink on and off every second.
