Skip to product information
1 of 4

Traffic Light

Traffic Light

SKU:AX22-0024

A PCB that looks like a real traffic light: a tall, narrow silhouette with three 5 mm diffused LEDs stacked vertically. Slide the board into a front panel, stick it on a robot, or mount it on a model-railway street corner then drive each lamp from its own GPIO pin (active-high) just as you would any plain LED.

Regular price $8.99
Regular price Sale price $8.99
Sale Sold out
View full details

Technical details

  • 330 Ω current-limit resistor on each LED
  • 3.3V or 5.0 V
  • Breadboard Compatible
  • Arduino IDE Compatible
  • MicroPython Compatible
  • MicroBlocks Compatible

Drag to rotate

Pinout & connections

Pinout & connections

Technical Resources

Traffic Light - (AX22-0024)

Drag to rotate

Arduino example

ax22-0024.ino
int ledPins[] = {1, 14, 41};
int numLeds = 3;

void setup() {
  for (int i = 0; i < numLeds; i++) {
    pinMode(ledPins[i], OUTPUT);
    digitalWrite(ledPins[i], LOW);
  }
}

void loop() {
  for (int i = 0; i < numLeds; i++) {
    digitalWrite(ledPins[i], HIGH);
    delay(500);
    digitalWrite(ledPins[i], LOW);
    delay(500);
  }
}