₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,422 members, 8,511,767 topics. Date: Monday, 02 November 2026 at 10:14 AM

Toggle theme

Roemai's Posts

Nairaland Forum › Roemai's Profile › Roemai's Posts

1 (of 1 pages)

Science/Technology › Getting Started With Arduino: Lighting Up The Leds. by Roemai(op): 10:30pm On Jan 17, 2024
In this beginner-friendly tutorial, we'll dive into the fundamentals of Arduino programming and circuitry by learning how to light up LEDs. We'll start with a single LED and gradually progress to building a simple traffic light system using the versatile Arduino microcontroller.

Blinking a Single LED
Materials Needed:
Arduino board (e.g., Arduino Uno)
Breadboard

LED (any color)

Jumper wires

Arduino uno smd board







Wiring Connections:

Connect the longer leg (anode) of the LED to digital pin 13 on the Arduino.

Connect the shorter leg (cathode) of the LED to the ground (GND) on the Arduino.

Power up the Arduino board.









Arduino Sketch:

void setup() {

pinMode(13, OUTPUT); // Set digital pin 13 as an output

}

void loop() {

digitalWrite(13, HIGH); // Turn on the LED

delay(1000); // Wait for 1 second

digitalWrite(13, LOW); // Turn off the LED

delay(1000); // Wait for 1 second

}

Explanation: This simple code uses the built-in LED on the Arduino board to blink at a 1-second interval. The digitalWrite function is used to turn the LED on and off.

Controlling Multiple LEDs
Now that we've mastered a single LED, let's move on to controlling multiple LEDs. We'll create a circuit with three LEDs, each lighting up in sequence.

Continue tinkering here: https://roemai.hashnode.dev/getting-started-with-arduino-lighting-up-the-leds

1 (of 1 pages)