To turn on a single LED using an Arduino. The components needed:
Arduino board (e.g., Arduino Uno)
LED (any color)
Resistor (220-330 ohms)
Breadboard
Jumper wires
Follow these steps“
Step 1. Connect the longer leg of the LED (positive terminal / anode) to digital pin 13 on the Arduino. Use a jumper wire and insert one end into pin 13 and the other end into any hole in the breadboard.
Step 2. Connect the shorter leg of the LED (negative terminal / cathode) to the resistor. Insert one end of the resistor into the same row as the LED’s shorter leg.
Step 3. Connect the other end of the resistor to the GND (ground) pin on the Arduino. Use a jumper wire to connect the resistor to any GND pin on the Arduino.
Step 4. Ensure your Arduino is connected to your computer via a USB cable.
Step 5. Open the Arduino IDE (Integrated Development Environment) on your computer. (The software you installed)
Step 6. In the Arduino IDE, select the appropriate board and port from the “Tools“ menu.
Code writing in the Arduino IDE (the software on your computer.
void setup() {
pinMode(10, OUTPUT); // Set pin 10 as an output
}
void loop() {
digitalWrite(10, HIGH); // Turn on the LED
delay(1000); // Wait for 1 second
digitalWrite(10, LOW); // Turn off the LED
delay(1000); // Wait for 1 second
}
Step 8. Please make sure you write the codes well because the little mistake you will make will be resulted in an error.
Step 9. Click on the “Upload“ button in the Arduino IDE to upload the code to your Arduino board. (On your top left on the app)
Step 10. The LED connected to pin 13 should now turn on and off repeatedly, with a 1-second delay between each state change.
NB: You can change the timer (1-second to either 2 or 3 seconds). That is the delay 1000 - 2000 - 3000
Well done for attempting to code.
1 view
977
386
1 month ago 03:33:33 5
Just Listen! Frequency Of God 1111 Hz: Unexplainable Miracles Will Extend To Your Entire Life
1 month ago 00:50:40 1
Загадка скрипок Страдивари -документальный фильм Violin Stradivarius
1 month ago 00:33:58 3
MEDIA LITERACY TRAINING: How predatory marketing is manipulating you
1 month ago 00:00:00 1
“BEL90A Ring Laser Gyroscope – Precision Navigation for Unmanned Vessels“
1 month ago 00:03:16 1
How to Draw a Spider Easy Step by Step
1 month ago 00:42:10 5
Tommy Robinson - The Untold Story
1 month ago 00:06:12 1
साबूदाना की बर्फी | नवरात्रि स्पेशल व्रत की
1 month ago 00:03:22 2
Haddaway - What Is Love (Shuffle Dance Music Video) 💃【4K】
1 month ago 00:02:41 1
[2025 DREAM WEEK] How to Make TOMORROW X TOGETHER
1 month ago 00:20:15 2
Karoline Leavitt’s Lifestyle 2025★ House Tour, Husband, Children, Cars, Net Worth....
1 month ago 00:04:29 3
After Dark - (Music Video - Lost In Translation)
1 month ago 00:00:00 1
Bucha Massacre Row At UN LIVE | Putin Aide ‘Proves’ How Kyiv & UK Conspired To Defame Russia
1 month ago 00:03:44 18
. 2: HEART OF CHORNOBYL | 1980’s LIVE-ACTION MOVIE
2 months ago 00:06:52 10
Rentarou’s love speech with ENG subs | Hyakkano/100 girlfriends
2 months ago 00:00:37 1
Revolutionary Skin Grafting Technique Revealed!
2 months ago 00:00:36 1
Corner Not Square? Do this. #tipcentric
2 months ago 00:03:48 1
OFFICIAL Somewhere over the Rainbow - Israel “IZ“ Kamakawiwoʻole
2 months ago 00:10:17 6
17+ Pretty Blood : Red Snow Part 2
2 months ago 00:02:35 1
Tate McRae - greedy (Official Video)
2 months ago 00:04:19 8
Al Bano & Romina Power - Liberta
2 months ago 00:27:20 4
MACRAME OWL Plant Hanger 🦉 Flower Pot Holder (DIY)
2 months ago 00:11:43 1
Revolutionizing Interior Design with AI: A Stunning Demo
2 months ago 00:06:59 1
자연산 광어 대광어 오로시 해체작업, How to Cut a Huge Flatfish?! Flounder Sashimi, 길거리 음식, Korean Street Food
2 months ago 00:12:19 1
DIY daily tote bag,. Zippered bag tutorials for beginners.