Introduction: Arcade LED Pattern

About: I like to build random things, some of which are presented here on Instructables.

I wanted to recreate the LED effect on the arcade machine in the background in the first few moments of the video. After watching it in slow motion, I concluded that the pattern consisted of groups of LEDs blinking on together and chase both forward and backward. There is a subtle bounce effect the LEDs on the end do, blinking twice with a slightly longer delay between than the actual chase delay.

Step 1: The Hardware

This is the hardware you will need:

1 Arduino Uno

3 2.2k ohm resistors

6 150 ohm resistors

3 TIP120 Transistors

6 3mm white LEDs

various wires of choice

I used the transistors to control two LEDs with one pin. There is a 2.2k ohm resistor in line with the Arduino pin wire and the resistor signal pin to prevent excessive current from running but into the Arduino and possibly frying its pin. I have 150 ohm resistors in line with the LEDs to prevent them from frying as well.

The two left LEDs are connected to the left transistor (pin 2), the two middle LEDs are connected to the middle transistor (pin 3), and the two right LEDs are connected to the right transistor (pin 4).

Step 2: The Codes

// LED pins<br>const int LED1 = 2;
const int LED2 = 3;
const int LED3 = 4;

int onInt = 100; // time LEDs are on
int d = 15;      // time in between the two sets

void setup() {
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
  pinMode(LED3, OUTPUT);
}

// calls lightUp for the forward then reverse directions, with an increased time between the change in direction
void loop() {
  lightUp(LED1, onInt, d);
  lightUp(LED2, onInt, d);
  lightUp(LED3, onInt, d);
  delay(d * 1.5);
  lightUp(LED3, onInt, d);
  lightUp(LED2, onInt, d);
  lightUp(LED1, onInt, d);
  delay(d * 1.5);
}

// turns on the LEDs on this pin, delays the onInt amount, turns them off, then delays between the next LEDS
void lightUp(int pin, int onInt, int d) {
  digitalWrite(pin, HIGH);
  delay(onInt);
  digitalWrite(pin, LOW);
  delay(d);
}

Step 3: The Final Product

Here it is in action!