The Official Raspberry Pi Projects Book - Projects_Book_v4

(singke) #1

raspberrypi.org/magpi The Official Raspberry Pi Projects Book 67


>STEP-01
Managing the screens
The screens were used in portrait and
landscape modes. Based on their power
draw, the displays were distributed
between different power supplies
situated at the back of the hub plates.

>STEP-02
Connecting the Pi boards
The 23 Pi boards are installed across four
hub plates, with varying lengths of power
and HDMI cables running between the Pi
devices and the screens. The displays are
configured to use HDMI by default.

>STEP-03
Shining a light
Testing the screens is difficult because
the Pi boards are under the platform – one
person troubleshoots the Pi devices while
another checks the displays. The adverts
run via Adafruit’s Pi Video Looper.

LIGHTING UP A MINIATURE TIMES SQUARE


GULLIVER’S GATE Projects


Above Every cable has been carefully labelled to make
troubleshooting easier

mounting mechanism for the
frames based on the Banggood
screen dimensions. The frame
parts were cut in ⅛‑inch black
cast acrylic and they were sanded
and glued together with Acrifix
solvent cement.”


Construction and power
To fix the screen controllers to
the displays, the team marked the
mounting holes before drilling and
taping them. “We only used three
holes to mount the controller board
because its base is not ľat, and
tightening all four screws would


have tilted it to one side,” explains
Uttam. “The screens were attached
to the frames using clear VHB tape.”
With all of that in place, they
could attach the HDMI and power
cables to the screen controllers.
There wasn’t enough room for
standard cables, so they used
KGML ľat angle adapters, which


also provided a measure of safety.
“The board wouldn’t be damaged if
someone accidentally yanked the
cables,” Uttam tells us. The cables
were then secured with ties to keep
them contained.

Coding real adverts
With construction complete, they
could prepare the Pi Zeros. Uttam
burned the Raspbian OS on to a
microSD card using the Etcher app,
and installed Adafruit’s Raspberry
Pi Video Looper to display the ads.
“We used a library, so most of the
programming task was already

complete,” he continues. “But to
save some time in configuring all
of the Pis, I wrote scripts to set
static IPs and change host names.”
The Pi boards were connected
to a 24‑port Ethernet switch
and placed under the platform
on which the models sit. The
team could then begin to gather

Targeting visitors by running


real ads on the miniature


screens is a real stroke of genius


adverts, which have come from the
advertisers themselves, shining
brightly from the buildings they
adorn. “They really added depth
and dynamism to the otherwise
still buildings,” Uttam says of the
final result. ģTargeting visitors by
running real ads on the miniature
screens is a real stroke of genius.”
Free download pdf