Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO Controlled Sequential LED Blinker

View and Edit Project In Cirkit DesignerImage of Arduino UNO Controlled Sequential LED Blinker

Circuit Documentation

Summary

The circuit consists of an Arduino UNO microcontroller connected to a series of ten red two-pin LEDs. The LEDs are controlled by the Arduino UNO, which sequentially turns each LED on and off with a delay between the transitions. The cathodes of all LEDs are connected to the ground (GND) pin of the Arduino, while the anodes are individually connected to digital pins D0 through D9.

Component List

Wiring Details

Arduino UNO

LED: Two Pin (red)

Documented Code

// Define the pin numbers for the LEDs
const int ledPins[] = {5, 6, 7, 8, 9, 0, 1, 2, 3, 4};
const int numLeds = sizeof(ledPins) / sizeof(ledPins[0]);

void setup() {
  // Initialize each pin as an output
  for (int i = 0; i < numLeds; i++) {
    pinMode(ledPins[i], OUTPUT);
  }
}

void loop() {
  // Turn each LED on and off sequentially
  for (int i = 0; i < numLeds; i++) {
    digitalWrite(ledPins[i], HIGH);  // Turn the LED on
    delay(500);                      // Wait for 500 milliseconds
    digitalWrite(ledPins[i], LOW);   // Turn the LED off
    delay(500);                      // Wait for 500 milliseconds
  }
}

Code Explanation