causes changes in the video game, requiring the user
to take action to avoid losing points and/or to gain
The two major elements in this example — the video
game and the lamp — were chosen because of their
simplicity. It’s hard to find an example of a game simpler
than Pong, and a lamp or LED is often the indicator of
choice when debugging a microcontroller. Still, what the
game and lamp represent is important. Substitute a more
substantial game and more complex remote device, and
you could have a system that’s actually practical. For now,
let’s get the simple framework working so that you have
an experimental platform.
Pong was understandably the game that put Atari on
the map. You simply slide the paddle horizontally to
intercept the bouncing ball to keep it in play. Miss the ball
and you lose points or the game.
I’ve added a few twists to the basic game to make it
part of the translational reality interface. There are two
states, identified by the color of the paddle and ball.
When they’re white (as in Figure 2), game play is normal.
Points accumulate for successful intercepts, at the rate of
However, when the ball and paddle turn red
(signifying an alarm/alert condition at the remote site), the
user must hold down the space bar while intercepting the
bouncing ball with the mouse-directed paddle. Fail to hold
down the space bar during the moment of impact with
the paddle and the score is returned to zero. However, if
the user manages to hold down the space bar while
moving the paddle (with the mouse) under the bouncing
ball, then the score increases by 1,000.
As currently configured, the gamer is allowed three
misses per session. However, as with the background
color, size of the ball, and other aspects of the game,
everything is customizable by changing a few lines of
Processing code. Also, in case you’re wondering, the lead
photo shows the Pong game with the screen refresh
disabled. If you haven’t played Pong before, perhaps you
can appreciate the simple geometry involved in game
play. With a little practice, you should be able to move the
paddle to where the ball is going before it gets there.
The hardware requirements for this project are
minimal, assuming you have a desktop or laptop computer
and an Arduino-compatible microcontroller. I use the
popular Uno in this example. As shown in Figure 3, the
Uno is connected to a CdS (Cadmium Sulfide)
photoresistor, a 10K resistor, and a 220 µF at 10V
electrolytic capacitor. In the dark, the resistance of the
photoresistor is several million ohms. Resistance drops to
1K or lower with illumination.
When the photoresistor is illuminated, the 220 µF
capacitor is charged by the Arduino’s 5 VDC source.
When illumination is withdrawn, the photoresistor is
essentially an open circuit, and the voltage across the
capacitor and resistor combination follows the expected
1/RC time constant. The decaying voltage level is read by
analog pin A2 on the Arduino. On the digital side of the
By Bryan Bergeron Post comments on this article and find any associated files and/or
/downloads at www.nutsvolts.com/magazine/article/
FIGURE 2. Pong game interface, coded in
April 2017 47
Translational reality is a real time, closed loop system in
which a user operates a familiar first device (e.g., a video
game) and, in so doing, both monitors and controls a
second device. User feedback is appropriate to the first
device — game play and scoring, for example — but
depends on the operation of the second device.