Circuit Documentation
Summary of the Circuit
This circuit consists of an Arduino UNO microcontroller, a resistor, and a red two-pin LED. The Arduino UNO is used to control the LED, turning it on and off at one-second intervals. The resistor is connected in series with the LED to limit the current flowing through the LED, protecting it from damage due to excessive current.
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 handling the timing for its on/off states.
Resistor
- Description: A passive two-terminal electrical component that implements electrical resistance as a circuit element.
- Properties: 220 Ohms resistance
- Purpose: Limits the current flowing through the LED to prevent damage.
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 UNO.
Wiring Details
Arduino UNO
- GND is connected to the cathode of the LED.
- D13 is connected to pin2 of the Resistor.
Resistor
- pin1 is connected to the anode of the LED.
- pin2 is connected to D13 on the Arduino UNO.
LED: Two Pin (red)
- cathode is connected to GND on the Arduino UNO.
- anode is connected to pin1 of the Resistor.
Documented Code
The following code is written for the Arduino UNO microcontroller to control the LED:
int LEDPin = 13; // Define the LED pin
void setup() {
pinMode(LEDPin, OUTPUT); // Set the LED pin as an output
Serial.begin(9600); // Start serial communication at 9600 baud
}
void loop() {
digitalWrite(LEDPin, HIGH); // Turn the LED on
Serial.println("ON"); // Print "ON" to the serial monitor
delay(1000); // Wait for a second
digitalWrite(LEDPin, LOW); // Turn the LED off
Serial.println("OFF"); // Print "OFF" to the serial monitor
delay(1000); // Wait for a second
}
This code sets up the Arduino to send a high signal to pin 13, turning the LED on, and then a low signal, turning it off, with a one-second delay between each state. The serial monitor will display "ON" when the LED is on and "OFF" when it is off.
