Circuit Documentation
Summary
This circuit is designed to control an LED using an Arduino UNO. The LED is connected to a digital pin on the Arduino through a current-limiting resistor. The Arduino is programmed to blink the LED on and off at one-second intervals.
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 LED with two pins: anode and cathode.
- Pins: cathode, anode
Resistor
- Description: A resistor with a resistance of 220 Ohms.
- Pins: pin1, pin2
- Properties:
- Resistance: 220 Ohms
9V Battery
- Description: A 9V battery for powering the circuit.
- Pins: -, +
Wiring Details
Arduino UNO
- D8 is connected to pin2 of the Resistor.
- GND is connected to cathode of the LED.
LED: Two Pin (red)
- cathode is connected to GND of the Arduino UNO.
- anode is connected to pin1 of the Resistor.
Resistor
- pin1 is connected to anode of the LED.
- pin2 is connected to D8 of the Arduino UNO.
9V Battery
- Not connected in this circuit.
Code Documentation
Arduino UNO Code
#define led_pin 8
void setup() {
// We're going to write to the pin, so we set its mode to OUTPUT
pinMode(led_pin, OUTPUT);
}
void loop() {
digitalWrite(led_pin, HIGH); // Turn the LED on
delay(1000); // wait a second
digitalWrite(led_pin, LOW); // Turn the LED off
delay(1000); // wait a second
}
LED: Two Pin (red) Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code used to control the LED.
