Skip to product information
1 of 4

RGB LED

RGB LED

SKU:AX22-0006

⏳ This item is currently sold out — a new batch is on its way and will be available soon!

This AX22-sized module carries a bright, common-cathode RGB LED plus on-board current-limit resistors, all on a tidy 22 × 22 mm PCB. Each color channel is driven by its own active-high GPIO pin—just set the pin HIGH and the LED lights, no transistor stages or low-side drivers required—so fading or blinking is as simple as PWM from your microcontroller. It snaps straight into any AX22 backplane, making it a drop-in way to add status lighting, mood effects, or user feedback to your project. Great for dashboards, interactive art pieces, or any build that needs vivid, three-color indication with minimal wiring.
Regular price $2.49
Regular price Sale price $2.49
Sale Sold out
View full details

Technical Details

- 22 mm × 22 mm square
- 4× ⌀2.7 mm Mounting Holes
- RGB, GPIO Control
- 3.3 V, 5.0 V
- Arduino IDE Compatible
- MicroPython Compatible
- MicroBlocks Compatible

Material Datasheet →

Pinout

Technical Resources

RGB LED - (AX22-0006)
🖱️ Click & drag to rotate
// Pin numbers for the RGB LED
#define RED_PIN 1
#define GREEN_PIN  14
#define BLUE_PIN 41

const int brightness = 25; //0-255

void setup() {
  // Initialize the RGB LED pins as outputs
  pinMode(RED_PIN, OUTPUT);
  pinMode(GREEN_PIN, OUTPUT);
  pinMode(BLUE_PIN, OUTPUT);
}

void loop() {
  // Fade in and out red
  for (int i = 0; i <= brightness; i++) {
    analogWrite(RED_PIN, i);
    delay(50);
  }
  for (int i = brightness; i >= 0; i--) {
    analogWrite(RED_PIN, i);
    delay(50);
  }

  // Fade in and out green
  for (int i = 0; i <= brightness; i++) {
    analogWrite(GREEN_PIN, i);
    delay(50);
  }
  for (int i = brightness; i >= 0; i--) {
    analogWrite(GREEN_PIN, i);
    delay(50);
  }

  // Fade in and out blue
  for (int i = 0; i <= brightness; i++) {
    analogWrite(BLUE_PIN, i);
    delay(50);
  }
  for (int i = brightness; i >= 0; i--) {
    analogWrite(BLUE_PIN, i);
    delay(50);
  }

  // Fade through a range of colors
  for (int i = 0; i <= brightness; i++) {
    analogWrite(RED_PIN, i);
    analogWrite(GREEN_PIN, brightness - i);
    analogWrite(BLUE_PIN, i / 2);
    delay(50);
  }
  for (int i = brightness; i >= 0; i--) {
    analogWrite(RED_PIN, i);
    analogWrite(GREEN_PIN, brightness - i);
    analogWrite(BLUE_PIN, i / 2);
    delay(50);
  }
}