Circuit Documentation
Summary
This circuit consists of an Arduino UNO microcontroller, a red LED, and a resistor. The Arduino UNO controls the LED, making it blink on and off with a delay of one second. The resistor is used to limit the current flowing through the LED 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
LED: Two Pin (red)
- Description: A red light-emitting diode.
- Pins: cathode, anode
Resistor
- Description: A resistor with a resistance of 200 Ohms.
- Pins: pin1, pin2
- Properties:
- Resistance: 200 Ohms
Wiring Details
Arduino UNO
- GND: Connected to pin1 of the Resistor.
- D13: Connected to the anode of the LED.
LED: Two Pin (red)
- anode: Connected to D13 of the Arduino UNO.
- cathode: Not connected in the provided net list.
Resistor
- pin1: Connected to GND of the Arduino UNO.
- pin2: Not connected in the provided net list.
Code Documentation
Arduino UNO Code
// Define the pin for the LED
const int ledPin = 13;
void setup() {
// Initialize the digital pin as an output.
pinMode(ledPin, OUTPUT);
}
void loop() {
// Turn the LED on (HIGH is the voltage level)
digitalWrite(ledPin, HIGH);
// Wait for a second
delay(1000);
// Turn the LED off by making the voltage LOW
digitalWrite(ledPin, LOW);
// Wait for a second
delay(1000);
}
This code initializes pin 13 of the Arduino UNO as an output pin. In the loop function, it turns the LED on and off with a delay of one second between each state change, making the LED blink.
