Circuit Documentation
Summary of the Circuit
This circuit consists of an Arduino UNO microcontroller, a red two-pin LED, and a resistor. The purpose of the circuit is to blink the LED on and off at a regular interval of one second. The Arduino UNO is programmed to control the LED's state using one of its digital pins. 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 Used: GND, D7
- Purpose: Acts as the control unit for the LED, providing the necessary signals to turn 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 UNO.
Resistor
- Description: A passive two-terminal electrical component that implements electrical resistance.
- Value: 270 Ohms
- Pins: pin1, pin2
- Purpose: Limits the current flowing through the LED to protect it from excessive current.
Wiring Details
Arduino UNO
- GND: Connected to one end of the resistor (pin2).
- D7: Connected to the cathode of the LED.
LED: Two Pin (red)
- Cathode: Connected to the D7 pin of the Arduino UNO.
- Anode: Connected to one end of the resistor (pin1).
Resistor
- Pin1: Connected to the anode of the LED.
- Pin2: Connected to the GND pin of the Arduino UNO.
Documented Code
// Code for Arduino UNO to blink an LED
int led = 7; // LED connected to digital pin 7
void setup() {
pinMode(led, OUTPUT); // Initialize the digital pin as an output
}
void loop() {
digitalWrite(led, HIGH); // Turn the LED on
delay(1000); // Wait for a second
digitalWrite(led, LOW); // Turn the LED off
delay(1000); // Wait for a second
}
File Name: sketch.ino
This code sets up the Arduino UNO to blink an LED connected to pin D7. The setup() function initializes pin D7 as an output. The loop() function turns the LED on and off with a one-second delay between each state change, creating a blinking effect.
