Circuit Documentation
Summary
This circuit consists of an Arduino UNO microcontroller, a red LED, and a 200 Ohm resistor. The Arduino UNO is programmed to blink the LED at regular intervals. The LED is connected to the Arduino through the resistor to limit the current.
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
- Purpose in Circuit: Acts as the main controller to blink the LED.
LED: Two Pin (red)
- Description: A red light-emitting diode.
- Pins: cathode, anode
- Purpose in Circuit: Provides visual feedback by blinking.
Resistor
- Description: A 200 Ohm resistor.
- Pins: pin1, pin2
- Properties:
- Resistance: 200 Ohms
- Purpose in Circuit: Limits the current flowing through the LED to prevent damage.
Wiring Details
Arduino UNO
- GND: Connected to the cathode of the LED.
- D13: Connected to pin2 of the resistor.
LED: Two Pin (red)
- cathode: Connected to GND of the Arduino UNO.
- anode: Connected to pin1 of the resistor.
Resistor
- pin1: Connected to the anode of the LED.
- pin2: Connected to D13 of the Arduino UNO.
Code Documentation
void setup() {
pinMode(13, OUTPUT); // Set digital pin 13 (D13) as an output
}
void loop() {
digitalWrite(13, HIGH); // Turn the LED on (HIGH is the voltage level)
delay(1500); // Wait for a second (1500 milliseconds)
digitalWrite(13, LOW); // Turn the LED off by making the voltage LOW
delay(250); // Wait for a quarter of a second (250 milliseconds)
}
Code Explanation
- setup(): This function runs once when the Arduino is powered on or reset. It sets digital pin 13 (D13) as an output.
- loop(): This function runs repeatedly after the setup() function. It turns the LED on by setting D13 to HIGH, waits for 1.5 seconds, turns the LED off by setting D13 to LOW, and then waits for 0.25 seconds before repeating the cycle.
