Circuit Documentation
Summary
This circuit consists of an Arduino UNO microcontroller, a red LED, and a resistor. The Arduino UNO is programmed to blink the LED on and off at one-second intervals. 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: 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 light-emitting diode.
- Pins: cathode, anode
Resistor
- Description: A resistor with a resistance of 200 Ohms.
- Pins: pin1, pin2
- Properties:
- Resistance: 200 Ohms
Wiring Details
Arduino UNO
- D6: Connected to the anode of the LED.
LED: Two Pin (red)
- Anode: Connected to D6 of the Arduino UNO.
- Cathode: Connected to pin2 of the resistor.
Resistor
- Pin1: Not connected.
- Pin2: Connected to the cathode of the LED.
Code Documentation
Arduino UNO Code
// Mendefinisikan pin LED
const int ledPin = 6;
void setup() {
// Mengatur pin LED sebagai output
pinMode(ledPin, OUTPUT);
}
void loop() {
// Menyalakan LED
digitalWrite(ledPin, 1);
// Menunggu selama 1 detik
delay(1000);
// Mematikan LED
digitalWrite(ledPin, 0);
// Menunggu selama 1 detik
delay(1000);
}
This code is written for the Arduino UNO microcontroller. It defines pin 6 as the output pin for the LED. In the setup function, pin 6 is configured as an output. The loop function then turns the LED on and off with a one-second delay between each state change, creating a blinking effect.
