Arduino UNO LED Wiring Guide
Interactive Step-by-Step Circuit Assembly
Place the LED
Insert the LED into two separate terminal rows on your breadboard.
Tip: Note down which breadboard row connects to the longer leg.
Connect Pin 13 to Resistor
Attach one end of the 220Ω resistor into Digital Pin 13 on the Arduino board using a jumper wire (or directly).
Connect Resistor to LED
Connect the other end of the 220Ω resistor to the Anode (+) (longer leg) of the LED.
Connect LED to GND
Use a jumper wire to connect the Cathode (−) (shorter leg) of the LED to an Arduino GND pin.
Connect USB Cable
Plug the USB-A end into your computer and the USB-B end into your Arduino UNO to power the board.
Upload Code
Open the Arduino IDE, paste the code below, and click the Upload button.
int LED = 13;
void setup() {
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(LED, HIGH);
delay(1000);
digitalWrite(LED, LOW);
delay(1000);
}
Observe Results
Once uploaded, your LED should blink at 1-second intervals:
No comments:
Post a Comment