To get familiar with Arduino input / output functionality, I came up with an idea of short piece of magic trick using LED lights controlled by Arduino. The idea is simple – moving the LED “light”, not the LED light itself but only the luminous. Technically, I used some basic components, such as 5 LED lights and 5 resistors and a bit of magic. There is no need to explain the magic part, as secrets should not be shared. Sorry 🙂

Followed you can see how the playing card was built and connected to Arduino. I used “tape” type of transmitters to build the circuit on playing card. In fact, I used 5 pieces of tape transmitters and 1 wire for ground.

Followed is the Arduino source code of the project:

/* Color coding */
Black wire [8h] White wire [14h] Red wire [11h] Blue wire [17h] Yellow wire [20h]

#define centerPin 3

int ledPins[] = {
4, 5, 6, 7
int pinCount = 5;
int timer = 3000;
int mainDelay = 5000;
int shortDelay = 1000;

void setup() {
pinMode(centerPin, OUTPUT);
for (int thisPin = 0; thisPin < pinCount; thisPin++) {
pinMode(ledPins[thisPin], OUTPUT);


void loop() {

digitalWrite(centerPin, HIGH);

digitalWrite(centerPin, LOW);

for (int thisPin = 0; thisPin < pinCount; thisPin++) {

digitalWrite(ledPins[thisPin], HIGH);

digitalWrite(ledPins[thisPin], LOW);