The remaining code is the true
meat of the program. It’s contained
in a WHILE loop that reads the input
from the tactile pushbutton to
determine when to capture a still.
The WHILE loop instructs the Pi to
check for input continuously until
you press the button.
The final line — raise SystemExit —
exits the program when the still has
This explanation is somewhat
cursory and passes over technicalities
within the Python language, but you
should now have an intuitive grasp of
what the code is used for.
If you’re squirming to know
more, there are many free online
resources to start writing Python on
your own (refer to Resources).
And now, what we’ve all been waiting for ...
To really give this mini camera
project some shape, you’ll want to
consider crafting a camera stick. Find
yourself some cardboard or other
material of your choice, and let your
creativity take over.
Keep in mind what you’ll want to
hold on to the camera stick: your Pi,
camera module, mobile power
I went ahead and made a
telescopic camera stick out of
cardboard (Figure 21). An inner bar
can extend by means of a simple
thread pulley (Figure 22). The Pi and
mobile power supply are stored at
the base of the stick (Figure 23).
Note that a one meter ribbon cable
was used (Figure 24).
By now, you should be able to
take pictures with the Pi camera
module (whether directly by code or
with a pushbutton), and operate the
Pi through a remote access method
of your choice (SSH or VNC).
Now, you just put it all together!
May/June 2018 69