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

Arduino UNO Controlled RGB LED Blinker

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

Circuit Documentation

Summary

This document describes a simple circuit that controls an RGB LED using an Arduino UNO microcontroller. The RGB LED will cycle through red, green, and blue colors, with each color being illuminated for one second before switching to the next color. The circuit includes current-limiting resistors for each LED color channel to prevent damage to the LED.

Component List

Arduino UNO

RGB LED (Wokwi compatible)

Resistors (3x)

Wiring Details

Arduino UNO

RGB LED (Wokwi compatible)

Resistors

Documented Code

/*
 * This Arduino sketch controls an RGB LED connected to an Arduino UNO.
 * The LED will blink each color (Red, Green, Blue) sequentially with
 * a delay of 1 second between each color.
 */

// Pin definitions
const int redPin = 9;
const int greenPin = 10;
const int bluePin = 11;

void setup() {
  // Initialize the digital pins as outputs
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
}

void loop() {
  // Turn on the red LED
  digitalWrite(redPin, HIGH);
  delay(1000); // Wait for 1 second
  digitalWrite(redPin, LOW);

  // Turn on the green LED
  digitalWrite(greenPin, HIGH);
  delay(1000); // Wait for 1 second
  digitalWrite(greenPin, LOW);

  // Turn on the blue LED
  digitalWrite(bluePin, HIGH);
  delay(1000); // Wait for 1 second
  digitalWrite(bluePin, LOW);
}

Filename: sketch.ino

Description: The code defines three pins connected to the RGB LED through resistors. It sets these pins as outputs in the setup() function. In the loop() function, it sequentially turns on each color for one second, then turns it off before moving to the next color. This cycle repeats indefinitely.