(^78) The Official Raspberry Pi Projects Book raspberrypi.org/magpi
n reflection, he could have
just bought a lamp. But
after Roberto Tyley stood
on one too many of his children’s
toys in the dark corners of his
bedroom, and decided it was time
for some additional light, he was
hit by a flash of inspiration.
What better way of illuminating
the room, he mused, than a full-
length portrait mirror that would
shine brightly whenever anyone
wandered by? One with individually
controllable LED lighting that
would directly respond whenever
someone posed in front of it,
perhaps? As light-bulb moments
go, he admits it was certainly high
on the wacky scale.
But Roberto saw the potential for
both practicality and fun. “The idea
was to have a mirror that would
know if my children were waving
their hands around,” he explains.
“I wanted the lights to move and
sparkle around their fingers as
they did so.”
Pi-powered
Roberto’s first decision was to put
a Raspberry Pi at the heart of the
build. He had only ever used the
computer once before, to create
a video demonstrating the speed
of a tool he’d written to clean Git
Projects SHOWCASE
Looking to brighten a dark
bedroom, Roberto Tyley decided
to cast fresh light on the idea of a
motion-sensing illuminated mirror
t took nine I
months to build
The laser
was £139 and
the project
cost £250
Roberto used
an eyeball-safe,
low-power
Class I laser
A Bluefruit EZ-
Key acts as the
on/off switch
Find the Python
code at
magpi.cc/
2wURUBy
Quick
Facts
MESMERIC
MIRROR
O
ROBERTO TYLEY
An open-source enthusiast, Roberto
develops software for The Guardian,
and authored the BFG Repo-Cleaner.
magpi.cc/2wVeHNE
This shelf of electronics
effortlessly slides into the
unit, connecting via a Multi-
Beam XLE power connector
Roberto didn’t want to use
an obtrusive always-on
video camera, so he used a
laser rangefinder instead
The Adafruit DotStar LEDs
use a simple wiring system,
with four wires controlling
the whole strip