No Results Found

The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.

Blog posts

Stranger Things Ouija Board

Build a Stranger Things style Ouija board out of cardboard, 26 LEDs, an Arduino Nano, some cables, a switch and some batteries.

Code for the Stranger Things Ouija Board


typedef struct // Create a structure to convert Binary of the PORTs for the corresponding Letter
{
byte portd;
byte portb;
}letter_data_t;

const letter_data_t letter[] =
{
{B00000100,B11111110}, //A
{B00000100,B11111101}, //B
{B00000100,B11111011}, //C
{B00000100,B11110111}, //D
{B00000100,B11101111}, //E
{B00001000,B11111110}, //F
{B00001000,B11111101}, //G
{B00001000,B11111011}, //H
{B00001000,B11110111}, //I
{B00001000,B11101111}, //J
{B00010000,B11111110}, //K
{B00010000,B11111101}, //L
{B00010000,B11111011}, //M
{B00010000,B11110111}, //N
{B00010000,B11101111}, //O
{B00100000,B11111110}, //P
{B00100000,B11111101}, //Q
{B00100000,B11111011}, //R
{B00100000,B11110111}, //S
{B00100000,B11101111}, //T
{B01000000,B11111110}, //U
{B01000000,B11111101}, //V
{B01000000,B11111011}, //W
{B01000000,B11110111}, //X
{B01000000,B11101111}, //Y
{B10000000,B11111111}, //Z
{B00000000,B00000000} //26 = 0ff
};

void setup() {
// Setup each pin used as an output
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
pinMode(12,OUTPUT);
}

void runHelpme()
{
PORTD = letter['h'-'a'].portd;
PORTB = letter['h'-'a'].portb;
delay(1000);
PORTD = letter['e'-'a'].portd;
PORTB = letter['e'-'a'].portb;
delay(1000);
PORTD = letter['l'-'a'].portd;
PORTB = letter['l'-'a'].portb;
delay(1000);
PORTD = letter['p'-'a'].portd;
PORTB = letter['p'-'a'].portb;
delay(1000);
PORTD = letter[26].portd;
PORTB = letter[26].portb;
delay(1000);
PORTD = letter['m'-'a'].portd;
PORTB = letter['m'-'a'].portb;
delay(1000);
PORTD = letter['e'-'a'].portd;
PORTB = letter['e'-'a'].portb;
delay(1000);
PORTD = letter[26].portd; //Turn off the LEDs
PORTB = letter[26].portb; //Turn off the LEDs
delay(1000);
}

void runHappyHalloween()
{
PORTD = letter['h'-'a'].portd;
PORTB = letter['h'-'a'].portb;
delay(1000);
PORTD = letter['a'-'a'].portd;
PORTB = letter['a'-'a'].portb;
delay(1000);
PORTD = letter['p'-'a'].portd;
PORTB = letter['p'-'a'].portb;
delay(1000);
PORTD = letter[26].portd;
PORTB = letter[26].portb;
delay(100);
PORTD = letter['p'-'a'].portd;
PORTB = letter['p'-'a'].portb;
delay(1000);
PORTD = letter['y'-'a'].portd;
PORTB = letter['y'-'a'].portb;
delay(1000);
PORTD = letter[26].portd;
PORTB = letter[26].portb;
delay(1000);
PORTD = letter['h'-'a'].portd;
PORTB = letter['h'-'a'].portb;
delay(1000);
PORTD = letter['a'-'a'].portd;
PORTB = letter['a'-'a'].portb;
delay(1000);
PORTD = letter['l'-'a'].portd;
PORTB = letter['l'-'a'].portb;
delay(1000);
PORTD = letter[26].portd;
PORTB = letter[26].portb;
delay(100);
PORTD = letter['l'-'a'].portd;
PORTB = letter['l'-'a'].portb;
delay(1000);
PORTD = letter['o'-'a'].portd;
PORTB = letter['o'-'a'].portb;
delay(1000);
PORTD = letter['w'-'a'].portd;
PORTB = letter['w'-'a'].portb;
delay(1000);
PORTD = letter['e'-'a'].portd;
PORTB = letter['e'-'a'].portb;
delay(1000);
PORTD = letter[26].portd;
PORTB = letter[26].portb;
delay(100);
PORTD = letter['e'-'a'].portd;
PORTB = letter['e'-'a'].portb;
delay(1000);
PORTD = letter['n'-'a'].portd;
PORTB = letter['n'-'a'].portb;
delay(1000);
PORTD = letter[26].portd; //Turn off the LEDs
PORTB = letter[26].portb; //Turn off the LEDs
delay(1000);
}

void runRandom()
{
for(int i = 0; i<=15; i++)
{
int x = random(0,25);
PORTD = letter[x].portd;
PORTB = letter[x].portb;
delay(random(40,200));
delay(random(40,200));
delay(random(40,200));
}
}

void flickerRandom()
{
int x = random(0,25);
for(int i = 0; i<=5; i++)
{
PORTD = letter[x].portd;
PORTB = letter[x].portb;
delay(random(40,500));
PORTD = letter[26].portd;
PORTB = letter[26].portb;
delay(random(40,500));
}
}

void test() {
for (int i=0; i<27; i++) {
PORTD = letter[i].portd;
PORTB = letter[i].portb;
delay(500);
}
}

void loop() {
flickerRandom();
delay(2000);
//test();
runHelpme();
delay(2000);
flickerRandom();
runHappyHalloween();
delay(2000);
flickerRandom();
runRandom();
}

Your connection is not private

Why I do not trust free Wifi and always try to access my site prior to any valuable access from abroad.
This is what I got last time in a hotel in London from the Hilton group. They are using a SSL sniffing man in the middle attack on my https connection. Beware to use it! Luckily my certificate pinning did undermine their effort. read more…

Pictures

Archives