Close

The Arduino sketch of the blinking sequence

A project log for A realistic, yet another Stranger Things alphabet

The simplest, most efficient way to talk with the Upside Down

enricoEnrico 12/17/2017 at 23:010 Comments

To control the lights in order to talk with the Upside Down, we need a proper blinking sequence.

Basically, we need to blink a light as many times as the representation of the letter in a sentence. Like in the movie.

But turn on only once was not enough. They need to be even more creepy.

The first step is to locate the letter in the alphabet index, use the index as a number to select the LED and blink. But how to blink it? It needs to be similar to an electric issue of the lamp, due to the master interference with out dimension with the Upsidedown world, which, of course, will cause electric conduction in the copper wires and make the light blink. Hmm.

In other words, the letter shall blink a given amount of times, but with a turn ON-OFF sequence with a random period per each ON-OFF. By adjusting the range of the random duration and the number of blinks, the effect can be tweaked; the picture here will show what will happens. The number of blinks is down to 6 blinks per letter, but the resolution in the sketch is way higher than 1/6th shown here:

The sketch will start with a default sentence looping (in the pic is shown RUN, but it will be MERRY CHRISTMAS), and will display a new one when new sentences are received from serial line (through the USB of the Arduino).

Letters remapping

To understand how to map everything, we sketched something on paper and tried to understand the letters location.

The result is that the sketch will also have to take into account the fact that, to keep the letters, we had to go in a serpentine shape. There will be 3 rows:

                                                             ABDCEFGH
                                                              IJKLMNOP
                                                          QRSTUVWXYZ  <- input

and the line is continuous from the H to P, from I to Q, and the connection starts from Z, so it must be reversed as well. Therefore a remapping is needed: for example, the LED #26 it is the A, the LED #19 the H, the LED #11 the I, the #18 the P and so on.

More colors to be a perfectionist!

When we built the bulbs, we also thought to make a regular color repetition.

This allow the color replication with the RGB of the plastic bulbs, since the same sequence of 4 colour is followed: orange, blue, green, red. So, with an RGB LED, why not enhance the color by turning on the same color of the plastic bulb? With a modulo 4, can be found which color is the current plastic bulb that shall be light up and then turn on the LED with the corresponding one, increasing the color vibrancy (or making combinations of them to obtain different colors of course).

Speak with different words

To change the sentence, for now it is used just a simple serial interface. While looping, the letters are blinking up to the end, then fading all of them to signal a new start of the sentence and so on. When from serial a new word (or sentence) is issued, as soon the previous sub-cycle of the letter ends finishing the random blinking, the new string is output on the LEDs, and it is notified again from the fading of all LEDs.

The sketch is available on GitHub.

Discussions