■ FIGURE 4. Electronic Ouija insides.
c := Alphas[c - “A”]
fade_up(c, tcolor, FADE_UP_MS)
fade_down(c, tcolor, FADE_DN_MS)
pub show_number(c)
c := Numbers[c - “0”]
fade_up(c, tcolor, FADE_UP_MS)
fade_down(c, tcolor, FADE_DN_MS)
The show_string() method loops through the
characters of the string, passing each to the appropriate
handler. The handlers (e.g., show_letter) convert the
characters to a channel number. Each of them uses a
channel map so that any character can appear on any
channel. If you build a project like this, you will need to
adjust the maps. This mapping strategy also allows us to
define a group, as is used with Goodbye.
you explore the program, you’ll find very simple methods
to fade a single channel or a group of channels up or
down.
This is a fun program because it’s very simple and can
be applied in many ways. John used it for Halloween, but
the suggestion originally came from several prop builders
who work in the escape room industry. The structure of
the base code makes it very flexible.
The single channel methods get the most use in
spelling out words that are not part of the command list:
pub show_string | len, idx, c
For example, it would be very easy to control other
outputs via the BLE interface; this opens up a lot of
interesting possibilities.
Build It, Johno!
len := tbuf.size
repeat idx from 0 to len-1
c := buffer[idx]
case c
“““““““A”..”Z””: show_letter(c)
“““““““0”..”9””: show_number(c)
“““““““““““““““: time.pause(FADE_DN_MS)
pub show_letter(c)
John enjoys woodworking, so that’s where he went
with this. His first task was deciding how to deal with the
numbers and letters. While at a local craft store, he
happened upon translucent plastic discs. After deciding on
a fairly traditional layout, he cut holes in the top panel for
each of the letters and numbers. Before installing the
plastic discs, he used the top surface as a template to
mark the inside of the back panel so that he knew exactly
where to position the lamps. You can see this in Figure 4.
Rub-on letters were applied to the discs and then glued in
place. The next step was to frost the backside of the discs
to enhance diffusion. Of course, he used our own HC- 8+
■ FIGURE 5. Two-line pixel driver.
will be fine. Just be mindful that
there may be some distance
between the WS2811 output pin
and the first lamp.
The HC- 8+ uses the TC4427
Jon “JonnyMac” McPhalen
jon@jonmcphalen.com
Parallax, Inc.
www.parallax.com
Propeller boards, chips, and
programming tools
EFX-TEK
www.efx-tek.com
Propeller-based controllers and
accessories
20 January 2018