Circuit Documentation
Summary
This circuit is designed to blink an LED connected to an Arduino UNO. The LED is connected in series with a 1k Ohm resistor to ground. The Arduino UNO controls the LED through digital pin D12.
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 1k Ohms.
- Pins: pin1, pin2
- Properties:
- Resistance: 1000 Ohms
Comment
- Description: A placeholder for comments or notes in the circuit.
- Pins: None
Wiring Details
Arduino UNO
- GND is connected to pin1 of the Resistor.
- D12 is connected to the anode of the LED.
LED: Two Pin (red)
- anode is connected to D12 of the Arduino UNO.
- cathode is connected to pin2 of the Resistor.
Resistor
- pin1 is connected to GND of the Arduino UNO.
- pin2 is connected to the cathode of the LED.
Code Documentation
/*
* This Arduino sketch is designed to blink an LED connected to pin D12.
* The LED is connected in series with a 1k Ohm resistor to ground.
*/
void setup() {
// Initialize digital pin D12 as an output.
pinMode(12, OUTPUT);
}
void loop() {
// Turn the LED on (HIGH is the voltage level)
digitalWrite(12, HIGH);
// Wait for a second
delay(1000);
// Turn the LED off by making the voltage LOW
digitalWrite(12, LOW);
// Wait for a second
delay(1000);
}
File Name: sketch.ino
This code initializes digital pin D12 as an output in the setup() function. In the loop() function, it turns the LED on and off with a one-second delay between each state change, creating a blinking effect.
