Projects Book v3 PDF
Projects Book v3 PDF
200
PAGES
of hacking &
making
ESSENTIALS
LEARN | CODE | MAKE
HELLO!
ince the last Official Projects book
S came out, the Raspberry Pi has
become the third best-selling
computer of all time, behind only PCs and
Macs. Its safe to say the Raspberry Pi is
becoming a household name and every day
we greet new eager coders and makers into
the community.
The aim of these project books is to
showcase some of the very best things you
can do with the Raspberry Pi. To that end the
books 200 pages are packed with amazing
creations from around the Pi world along
with guides and step-by-step tutorials to
make your own projects. Whether youre new
to Pi and want to learn coding basics or a
grizzled maker veteran wanting to get some
new ideas, theres something for everyone.
I look forward to seeing what youre
inspired to do after reading this book!
Rob Zwetsloot
This bookazine is printed on paper sourced from This official product is published by Raspberry Pi (Trading) Ltd., Station Road, Cambridge, CB1 2JH. The publisher, editor and
sustainable forests and the printer operates an contributors accept no responsibility in respect of any omissions or errors relating to goods, products or services referred
environmental management system which has to or advertised in the magazine. Except where otherwise noted, content in this magazine is licensed under a Creative
been assessed as conforming to ISO 14001. Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0). ISBN: 978-1-912047-70-3.
PAGE 06
Projects 48 82
Reviews 188
Beginners Guide to
CODING
Discover the joy and art of computer programming with your Raspberry Pi
Code Matters
I think everybody in this country should learn to program a
computer, said Apples co-founder Steve Jobs, because it
teaches you how to think.
Code is a critical layer in our lives that sits between us
and the increasingly digital world that surrounds us. With
just a small amount of understanding how code works,
youll be able to perform computer tasks faster and get a
better understanding of the world around you. Increasingly,
humans and machines are working together.
Learning to use code and hardware is incredibly
empowering. Computers are really about humanity; its
about helping people by using technology. Whether its the
home-made ophthalmoscope saving eyesight in India, or
the Computer Aid Connect taking the internet to rural Africa,
code on the Raspberry Pi is making a real difference.
Coding also makes you more creative. It enables you to
automate a whole bunch of boring and repetitive tasks in
your life, freeing you up to concentrate on the fun stuff.
It also teaches you how to solve problems in your life.
Learning to how to put things in order, and how to break
down a big, seemingly impossible task into several small
but achievable tasks is profoundly life-changing.
And if youre looking for a career boost, theres plenty of
worse things to learn. Our policy is literally to hire as many
engineers as we can find, says Mark Zuckerberg, CEO
of Facebook. The whole limit in the system is that there
just arent enough people who are trained to have these
skills today.
What is a
Program? Discover the building blocks of software
and learn what goes on inside a program
efore you go any further, lets look at what a One thing that may surprise you when you begin
Which B program actually is. The dictionary definition programming is just how little you need to know to
Variables
Variables are all-purpose containers that you use to store data and objects
f youve created a science project or Variables can also be used to contain strings.
Python I experiment, you may have come across These are groups of letters (and other characters)
While & For Get your program to do all the hard work with while and for loops
omputers are great because they dont mind Then we use the while statement followed by a
Comparison C doing the same stuff over and over again. condition: counter < 3.
Theres a massive nerd debate about whether to use spaces or tabs while condition:
when indenting code. There are valid arguments on both sides but indent
use spaces for now. When youre a hardcore coder, you can make
the argument for tabs. Imagine a three-way chat between all three items
in our polly.py program:
Conditional
Branching Give your programs some brains with conditional branching
our programs have been slowly getting more Be careful not to confuse the equals logic operator
Logical Y powerful. Weve learned to run instructions == with the single equals sign =. While the double
if False:
print("The first block of code ran")
password = "qwerty"
elif True:
print("The second block of code ran") attempt = input("Enter password: ") Password2.py
else:
print("The third block of code ran") if attempt == password:
print("Welcome")
Run this program and youll find it skips the first if else:
statement, but runs the elif statement. Youll get The print("Incorrect password!")
second block of code ran.
The else statement doesnt have a True or False
condition; it runs so long as neither the if or elif Writing FizzBuzz
statements are True. (Note that the else statement here, The brief for our FizzBuzz is to print the numbers up to Comments
as always, is optional; you can just have if and elif.) 100. If a number is divisible by three (such as 3, 6, and 9),
But what happens if you change both the if and elif then you print Fizz instead of the number; if the number A mark of a good
conditions to True? Give it a try and see whether just is divisible by five, you print Buzz instead. programmer is to
if runs, or elif, or both. Experiment with removing the But if a number is divisible by both 3 and 5, such as use comments in
else statement and play around. Itll help you get the the number 15, then you print FizzBuzz. your programs.
hang of the if, elif, and else statements. Were also introducing a new element in FizzBuzz: Comments are
the and statement. This checks if two conditions used to explain
FizzBuzz areboth True: that the number can be divided by bits of your
Were going to show you a common program used both3 and 5. It only returns True if both conditions program to
in computer programming interviews. Its a classic areTrue. humans. They
called FizzBuzz, and it shows that you understand if, There are three main logical operators: and, or, are completely
else, and elif statements. and not. The first two are relatively straightforward, ignored by
First, you need to know about the modulo operator but the not operator can be more confusing at first. thecomputer.
(%). This is used to get the remainder from a division Dont worry about it too much; youll get the hang of In Python, you
and is similar to a divide operator. Take this function: it with practice. start a comment
Enter the fizzbuzz.py code from page 17 to practise line with a hash
10 / 4 == 2.5 using if, else, and elif elements and logical operators. symbol (#). It can
be on a line on
If we use a modulo instead, we get this: it own, or it can
come right after
10 % 4 == 2 a line of code. As
soon as Python
Modulo turns out to be handy in lots of ways. You hits the #, itll
can use % 2 to figure out if a number is odd or even: stop translating
whatever follows
10 % 2 == 0 # this is even into machine code.
11 % 2 == 1 # this is odd Comments help
other users to read
This program works out if a number is odd or even: your program, but
they will also help
number = 10 you understand
what youre doing
if number % 2 == 0: (long after youve
print("The number is even") forgotten). Its
else: a good habit to
print("The number is odd") use comments in
your programs.
OK lets move on to FizzBuzz.
Creating
Functions
Create the building blocks of code and make more robust programs
Working functions
Were going to create a function that prints the lyrics
def absolute(number):
to Happy Birthday.
Type out the happy_birthday.py code from the
if number < 0: Absolute.py
return number * -1
listing, then run it. In the Shell, enter:
else:
return number
happy_birthday("Lucy")
10 * -1 = -10
-10 * -1 = 10
Going further
We need to create a function that takes a number
as a parameter and checks if its negative. If so, it
Here are some resources you will find useful.
multiplies it by -1; if its positive, it simply returns the
number. Were going to call our function absolute().
GPIO Zero Essentials magpi.cc/2bA3ZP7
Enter the code in absolute.py. When the function
This Essentials guide book explains how the GPIO Zero Python module
hits either of the return statements, it returns the
provides access to a bunch of features. These are used to hook up
value of the number (either on its own or multiplied
electronics to your Raspberry Pi via the GPIO pins.
by -1). It then exits the function.
Run the absolute.py code and enter the following
FutureLearn magpi.cc/2h5Sthf
in the Shell:
The Raspberry Pi Foundation has two new online training courses:
Teaching Physical Computing with Raspberry Pi and Python, and
absolute(10)
Teaching Programming in Primary Schools.
absolute(-10)
Importing
This returns 262144.0.
You can also access constant values from a module,
Code
which are fixed variables contained in the module.
These are like functions/methods, but without
the parentheses.
math.pi
math.e
PROJECTS
SHOWCASE
Here are just some of the amazing projects that the Raspberry Pi community
make every day. Hopefully theyll give you some amazing ideas of your own
22 34
16.
32 38
40
Photo: Rickey Ramsey
Projects
46
JAMES
BOND SPY
PROJECTS Come in, Bond, and please be careful.
We have the very latest in spy
technology ready for your next mission
[TOP SECRET]
AUDIO SPYING..............{24}
Conversnitch is a network-enabled listener
that plugs into a light socket and listens in to
conversations. The Raspberry Pi transcribes
the words to text and shares them.
VOICE CHANGER.........{24}
Use the Raspberry Pi Voice Distorter to
change the sound of your voice. Perfect
for keeping your secret identity intact.
HIDDEN CAMERA.........{27}
Pinhole spy cameras can be placed
anywhere, but the boldest secret
agents will wear a hidden camera.
GPS TRACKER...............{28}
Dont lose track of your suspects. Attach a
GPS device to a Raspberry Pi and you can
follow people around from a distance.
GEIGER COUNTER.......{29}
Nuclear radiation can be deadly, and
you never know when some is around.
Our Geiger counter is vital on those
more dangerous missions.
[MAKER PROFILE]
BRIAN HOUSE
& KYLE MCDONALD
Brian House is a fellow at the Tow Center
for Digital Journalism at Columbia
University; Kyle McDonald is an artist
who works in the open with code, and an
adjunct professor at NYUs ITP (Interactive
Telecommunications Program).
magpi.cc/1QRSep8
CONVERSNITCH
This Raspberry Pi device plugs into a light socket and listens to conversations.
These are then transcribed and shared on Twitter
onversnitch is one of the coolest spy devices Conversnitch costs less than $100 to build.
The software
automatically records
audio in ten-second
bursts and uploads them
to be transcribed. Then it
automatically shares the
results on Twitter
A microphone is attached
to the Raspberry Pi to
capture audio that the
device overhears
Youll
Need LUNCH BOX
COMPUTER
> Custom lunch
box
> Raspberry Pi 2
with micro SD
card
Hide your Raspberry Pi where nobody will think to look
> Clear Raspberry
Pi case inside your lunch box
[MAKER PROFILE]
> 5-inch LCD
o secret agent outfit is complete without a
> Bluetooth
keyboard N briefcase, and no spys briefcase is complete
without a stash of secrets. D10D3
> 6,800 mAh 2v
software
rechargeable There are lots of Raspberry Pi computer projects around, A maker, a hardware and
, an artist, and gen eral
battery but we think youll admire this Lunch Box Computer hacker
tiable need
dreamer. He has an insa
> USB cables by the cryptically named hacker, D10D3. It has all the dify them. Hes
to build things and mo
, fantasy,
components you need to run Raspberry Pi code on the a lover of science fiction
unk, com ic books, computers,
move, and hides your Pi safely inside an inconspicuous cyberp
gam es. In short,
and role-playing
box. Its ideal for places where computers are not allowed, of all trades.
hes a geek and a jack
and impromptu hacking projects. magpi.cc/1QRSkwR
A Bluetooth
keyboard
is attached
(with foam
tape) to the
inside of the
lunch boxs
Youll need two batteries for lid. When
this build: one to power the opened up, it
Raspberry Pi, and another to acts just like a
power the display regularlaptop
MOTION DETECTION
Make sure everything works, advises D10D3, You
might need to configure the WiFi dongle or change
ALARM SYSTEM
the screen size. If it defaults to a resolution thats too
high, itll be hard to read the text, so you can always
plug an HDMI monitor into it while you configure it.
Once you know everything works, you can use some
foam tape to mount everything in the lunch box. I Spies dont just need to gather
only used tape on the front edge of the keyboard, so I information they also need to keep
could swing it up to turn it on and change its batteries. their location secure. When youre
Make sure that you arrange things so you have room out in the field, what about all your
to get into it to charge stuff later. Also, make sure files back at HQ? The answer is to
theres room to unplug the Pi when youre done using create an alarm like Anne Nevins
it, since the Pi doesnt have an on/off switch. Motion Detection Alarm System
There are lots of ways to do a project like this, so (magpi.cc/1QJeXxf). We like this
feel free to deviate from D10D3s plans: All of the one because it uses Twilio
parts are modular, and you can change its abilities by (twilio.com) to send you alerts via
using different parts. SMS, so they come straight through
The Lunch Box Computer is a great project for on your mobile phone. You can set
budding spies and sleuths. Its a quick hack for hiding it up with any webcam, and it uses
a Raspberry Pi, and allows you to carry your portable Reactive Blocks (bitreactive.com)
hacking device into places with tight security. to program the alarm system.
Just be careful not to share your sandwiches, 007.
A WiFi dongle is
used to connect
the device to a
nearby smartphone
acting as a hotspot.
This network is
A GPS breakout board is used used to transmit
to gather the position of the the GPS data to a
Raspberry Pi remotedevice
Youll
Need
> Raspberry Pi
> Smartphone or
T building a GPS tracker from a Raspberry Pi is
entirely possible as David Sulpy, co-founder
device and streams it over the mobile data connection
to you. This GPS data is parsed through Initial State
WiFi hotspot and CTO of Initial State, shows. His GPS Tracker (initialstate.com), a data visualisation web dashboard
device
combines a Raspberry Pi tethered to a mobile phone with enabling you to view the GPS Trackers location
> Adafruit SMA-to-
an Adafruit GPS module (magpi.cc/1Ufpyre). in a real-time map view.
uFL adapter
I researched many ways to accomplish this task
> Antenna
[MAKER PROFILE]
without having to utilise superfluous hardware, says
> WiFi dongle David. The Raspberry Pis proliferation as a mobile
> Female-to- computing platform makes it the perfect candidate
female jumper
wires DAVID SULPY for projects like this.
This GPS Tracker is a project for a future member of
David is a computer scientist, software
and security engineer, and founder/ Q Branch to get their teeth into. It combines a variety
CTO of initialstate.com, a data analytics of quirky parts with a lot of interesting code, and
service for Internet of Things devices.
gathers a lot of data.
thegoodbits.sulpy.com
The Adafruit Ultimate GPS Breakout board comes
with the board, some header pins, and a CR1220
Quick
Facts EIDSHEPHERD:
> The enclosure
was
constructed
from 6mm
plywood and
scrap timber
EIDSHEPHERD
>STEP-01
The cricket bat
The components are housed inside a wooden box,
with two batteries used to power the Raspberry Pi and
LED display. The RFID scanner is fitted at the bottom
The sheep have a small electronic tag fitted behind the ear that needs frequent scanning of the cricket bat.
Experience the
installation your own
way, at your own pace
LICHEN BEACONS An interactive sound art installation which shows that science
Quick and engineering arent the only applications for the Raspberry Pi
Facts ichens, apparently, are installation, involving someone and the Bluetooth responses to the
> The project
took about
L dual organisms. Fungi
and algae living together
walking around a large room with
a portable Raspberry Pi (Pi-in-a-
EddystoneBluetooth beacons come
in the form of music, pictures,
six months to
mutually, theyre a good indication box) and uncovering Bluetooth andpoems.
complete
of air pollution and the subject of beacons that activate different The idea with this platform is to
> At the time of
the fascinating Lichen Beacons responses. The portable Pi comes make it possible to slow down and
writing, its only
been shown in project. This is a digital sound art with a screen and headphones, take in a digital environment, at a
two places very different pace from the usual
> While the The lichen beacon is a hectic screen-hopping and social
beacons arent Bluetooth beacon; the media hot-desking that seems to
Pi-powered, Pi looks for its signal to
it could be trigger the poetry, music, define most digital environments,
and images. says the team that created the
doneeasily
people, including some that were thinking about the poetics of immersive experience. Part of
self-declared technophobes, and digital environments, and how the future plans to improve the
because all they had to do was walk such environments relate to the installation involve this sound,
and explore the location looking worlds fragile ecology Theres according to Tom: Just as the
for Lichen Beacons, there were no politics in the poetics, too: a way audience can experience the 18
technology usage issues with the of thinking about how sound parts of the installation in any
equipment. This was a very pleasing art can respond to the sites in order, Id like to create a musical
result and made the event much which it is installed, while also environment that responded
more inclusive. opening up the larger questions differently to the order in which
From my perspective, theres of our environmental crisis. Our people visited the beacons.
a special affinity between lichens, installation is a model for using The installation should be
digital photography, and small technology in ways that are both turning up in more places around
screens, Drew says. The home-made and also at the the UK and Europe, so keep an
challenge is to find a new grammar sharp end of what contemporary eye out for information on where
of thinking and writing that can technology makes possible. you might be able to experience
echo the world-making symbiosis The sound design is binaural, it; the full event schedule
of lichen life. Our installation with music wrapping around the can be found on the Ludions
offers the perfect platform for sequential poems to create an website: ludions.com/events.
Quick
Facts
> Work started
after Pi Wars
in December
BURT BOT
A Raspberry Pi Zero robot, BURT is one of the smallest
> Its coded in and cutest robots youll see
Pygame, the
module for
aspberry Pi Zero robots using the things I had learnt BURT name). The complex part is
R
Python
are hardly new in fact, through Pi Wars. putting it all together and working
> The wood was
cut at RazorLab in The MagPi Pi Zero Its a remote-controlled device, out where everything can go,
issue (#40) we featured a fully so not truly autonomous, but its whilst trying to maintain a small
> A Pololu motor
controller functional Raspberry Pi Zero robot still an excellent little project. footprint. Everything is compact
powers the before the board was even out! BURT comprises a custom- and fiddly, but that was always
Pololu motors
The thing we like best about Pi designed plywood chassis that the aim.
> The PCB face Zero robots is that theyre always can be rapidly revised and remade, BURT is still a work in progress,
saves on wiring
quite inventive and different a custom PCB face with a but Richard seems happy with
space
(such as the Matchbot), and BURT couple of LEDs that react to the the way it has turned out so far:
is no different. movement of the robot, and a I aimed to make a small basic
Created by Average Man himself series of motors. Motor drivers robot that could move around; that
Richard Saville, BURT stands and remote controls finish off the part works as intended, and the
for Boxey Unintelligent Robot robot to make it work. media centre remote control does
with Tracks. I had attended Pi Its not complex at all in terms the job well. BURT seems to be able
Wars back in December with of features, Richard points to negotiate a range of different
my other robot, AverageBot, out. BURT has no sensors or terrains with ease.
Richard tells us. When the new anything clever simply two Some of Richards plans to
Pi Zero came out, I wanted to try motors and basic controls (hence upgrade BURT should help to
my hand at making a mini robot the Unintelligent part of the make it more autonomous. First
MOVING BURT
>STEP-01
Its a great-looking robot, Turn it on!
with the wood panels
giving it an extra stylistic Youll need to add some batteries and get the Pi started
flair that suits it up. This will provide power for the motors, then you can
start the script to use it.
The board with the LEDs is
custom-made, to cut down
on wiring in the project
on the agenda is to try to add a they dont play live as Pink Floyd >STEP-02
line sensor, much like the CamJam anymore. To become #1 son, Im Controlling BURT
EduKit robot. The current power making him a Pi screen unit, BURT is currently controlled with a media centre
source, a series of AAA batteries, coded with Pygame, that will let remote, which is picked up by a USB sensor. The
doesnt last very long either, so him choose a country and see all LEDs on the front react to BURTs movement.
hes considering replacing it with the live gig videos. I cant get him
a rechargeable LiPo one: LiPo a ticket, but I can take him back in
batteries still scare me a bit after time (kind of)!
Quick
Facts
PI MOON
CAMERA
> This particular
adapter only
works with
Canon lenses
BUILDING A
MOON CAMERA
>STEP-01
3D print the adapter
The Canon lens adapter was 3D printed from a
design found on Thingiverse.com, by Charmlee
The final image, post-Photoshop. The pink tinge on the original unedited
(magpi.cc/1MhDNJl). Its three parts the main body,
image (bottom-left) was caused by a layer on the Pi camera sensor base, and rear panel simply slot together.
>STEP-02
Remove Pi camera lens
Above All the components James used for the project, including the red 3D printed
To enable the Pi Camera Modules sensor to be
lens adapter in three parts, which he later wrapped in duct tape exposed directly, its tiny stock lens needs to be
captures a small section of what James admits that a DSLR would removed. It can be unscrewed using small pliers
the lens can see, it does so with 5 be better for taking a picture do so at your own risk!
megapixels worth of detail. This led like this, but only with a longer
James to try shooting a full moon lens, something larger than
from his Berlin balcony, using a 300mm, or even a telescope.
78-300mm lens, which resulted in One peculiarity in his moon photo
a surprisingly detailed image of the is the pink vignette around its
cratered lunar surface. edges, caused by light reflecting
Asked what camera settings on a layer of the Pi camera sensor.
he used, James replies, Im He has since managed to reduce
embarrassed to say I left it on auto. the effect by wrapping the camera
In fact, the command I used had no adapter in black duct tape.
modifiers at all raspistill -o As well as being useful for
moon.jpg. What I got really was a astronomy images, Jamess setup is
happy accident. Could I improve ideal for any type of photo or video >STEP-03
the picture with changing some requiring a high level of zoomed- Fit it all together
settings? Absolutely! I think I need in detail. You could use [it] to The Canon EOS lens screws onto the front of the
to learn more about how the optics monitor birds nests that might be adapter body, while the Pi camera sensor slots into
work. Maybe I could adjust the quite a distance away [or for] macro the rear panel. Youre now ready to shoot the moon,
distance between the lens and the photography with an assortment or any other subject!
sensor to improve the sharpness. of lenses and adapters.
A complete model
railway, much smaller
than the Model Town
outside the door.
Human for scale
Quick
Facts
WIMBORNE
MODEL
> The town is
refurbished in
the winter while
its closed
> Terry is a
RAILWAY
veteran coder
>STEP-01
Daytime
Although Thomas the Tank During the day portion of the cycle, a 48W LED strip
Engine-themed, there are
some other pop-culture is lit by the Pi (seen at the top of this photo) to light up
cameos on the railway the model railway. Its very bright, and illuminates the
entire display for five minutes.
Quick
Facts
> The Fish-eye
was an art
installation
in Oregon
BUILDING
A FISH-EYE
>STEP-01
Stripped display
A 19-inch LCD is recycled from an unloved monitor.
Once stripped of its surrounding case, the display
will form the front of the Fish-eye screen.
Quick
Facts RASPBERRY PI
> Mark likes to
brew coffee
in a cafetire,
also known as
a French press
COFFEE ROASTER
Want to up your coffee-making game even further? Make a cheap yet
> Colombian,
Ethiopian, accurate coffee roaster, like Mark Sanders did, for a better cup
and Mexican
beans have aking a truly good cup
roastedwell
that suggested home roasting as a from the popper and used them
source of tasty coffee, Mark tells in another vessel.
us. Getting started is as simple I took the heater and fan
as purchasing a used popcorn from a popper and added several
popper from the local thrift store other components to create a
for $4-$8. temperature-controlled coffee
Popcorn poppers are popular roaster, Mark explains. A
among home-roasters, as they thermocouple was added to
stir the beans while very hot air measure the temperature inside
blows on them very similar the roasting chamber. A GPIO pin
4BOT
DAVID PRIDE
Returning to school 30 years later,
David became an MSc student thanks
to taking up the Pi as a hobby.
magpi.cc/1XrC3zU
Helpful instructions
Facts
how to do so
MAKING A MOVE
The 4bot was a smash at the
Raspberry Pi fourth birthday
party, with over 100 games played
>STEP-01
Begin game
The 4bot lets you know when its ready to go. Read
the instructions on the display and press the button
to start the match.
>STEP-02
In terms of how well it plays, Red goes first
Connect 4 is a perfect game Its time to make your first move. Once youre done,
the Pi camera takes a photo of the game area and
Quick
Facts
> The build took
two weeks to
complete
>STEP-01
Building the case
Multiplex wood was cut, using a jigsaw, to form the
case. The large rectangle is for the screen, while the
circles form holes for the buttons.
Quick
Facts
> The
AlexaPhone
ALEXAPHONE
The Raspberry Pi inside this 1970s telephone calls up Amazons Alexa
took two weeks
to build voice assistant and gets the answers to almost any question
> Alexa uses
artin Manders has a and vital facts like how old is
M
natural A pirate-themed speaker was
language dismantled to provide the phone passion for upcycling Graham Norton? or why is the
processing with more volume
vintage technology. sky blue?.
AI to answer
questions Hes well-known for using the She has a fun side too,
Raspberry Pi to add smarts to Martin tells us, with a seemingly
> AlexaPhone
only takes two classic VCR and radio technology, bottomless selection of dad jokes
seconds to but his latest project, the and preprogrammed responses to
respond AlexaPhone, makes an old odd questions like would you like
> The telephone ultra-smart with a to build a snowman?. Beyond the
Trimphones
connection to Amazons Alexa jokey faade, Alexa also sets timers
dial contains
a tiny amount voice search system. and reminders, plays music, and
of radioactive Martin has stripped out a classic reads audiobooks.
tritium
1970s Trimphone and fitted a I have a real weakness for retro
> Around Raspberry Pi inside. You lift design, says Martin, especially
1.6 million
the handset, speak your query, telephones and televisions. The
Trimphones
were sold and the response from Alexa is Trimphone was the height of
in the 1970s read out via a built-in speaker, technology in the 1970s, replacing
explains Martin. the bell ring of classic phones with
Alexa provides users with an electronic warbler. I think I
information on the web via voice picked it up at a car boot sale in
search, including weather, news, Brighton about 15 years ago, he
BUILDING A RETRO
The finished project is a stylish
1970s Trimphone that calls
Amazons Alexa service
VOICE ASSISTANT
>STEP-01
Hooking up a mic
A USB internet phone is hooked up to the Trimphone
using a 3.5mm audio cable taped to the connections
of the receiver. This acts as a digital microphone.
recalls. It proved perfect for the enabled and headless. Getting all
AlexaPhone project, as the internal of the components to fit inside
wiring has convenient modern the phone body was a bit of a tight
ribbon cables for connection squeeze, but with some liberal
to the Raspberry Pi. plastic trimming it came together
Martin used an old USB internet in the end.
phone to connect the Trimphones The only thing Martin
microphone to the Raspberry Pi. A updated was the name of an
cheap portable speaker is stripped MP3 file in the script. This was a
down and fitted inside to play back straightforward change so that
the responses. the AlexaPhone would sound its
After some digging around, signature Trimphone ringtone
I came across Sam Machins on boot instead of Alexas usual >STEP-02
excellent AlexaPi code on chirpy Hello!. Speaker
The AlexaPhone speaks its response after you hang up
a seemingly bottomless
selection of dad jokes
GitHub (magpi.cc/1U61O6r), Ive found it accurate, the voice
revealsMartin. It offers Alexa recognition is good, and even
integration for the Raspberry Pi when Ive stumbled over words,
with a physical button connected Alexa usually figures out what
to the GPIO pins. was said. I have it on my office
The AlexaPhone started desk and use it nearly every day,
out as a quick distraction, he sometimes to get information,
continues, but was so much but often just asking questions
fun to build it just took over. out of curiosity to see whether >STEP-03
I got the AlexaPi software fully Alexa will understand them. Shes Alexa calling
working on my Raspberry Pi 3 particularly good at maths as well, The body of AlexaPhone is Dremeled out to fit all the
in the workshop, then repeated so the AlexaPhone comes in handy components inside. The end result is a neat Trimphone
all the steps, removing cables for double-checking the kids that calls Alexa when you pick up the handset.
as it gradually became wireless- homework answers.
Quick
Facts
BEEKEEPING
> Each hive
has around
30,000 bees
SERVER
> Valentin owns
30 hives in total
BITCOIN
BLOCK
CLOCK
Visualise a Bitcoin node with a
great light display that tells you
how well the current block is
going in your block chain
f you work or pay attention
Facts
industry, youll know how
ubiquitous Bitcoin is. The digital
Visualise the current
state of the block chain currency is big in the tech world,
with this display > The build took and considering how much Bitcoin
about four
is currently worth, it can be very
months
Interact with the monitor advantageous to help mine some of
clock and even use it as > A full list of
it its basically free money! Well,
a Bitcoin piggy bank components
can be found minus the expense of the electricity
here: required to help with the mining.
magpi.cc/
Raspberry Pis are quite popular for
1PnglX0
Bitcoin uses, but Matthew Zipkin
> The enclosure
build was fairly
has found a fairly novel way of
new ground for connecting his Pi to Bitcoin.
Matthew, but The Bitcoin Block Clock is
turned out well
a Bitcoin full node connected
> Matthew chose to a 3232 RGB LED grid, which
the Pi due to
the strength of
visualises certain network
the community properties in a fun, colourful
> Matthew is clock-like display, Matthew
currently explains. So thats two things:
building a Bitcoin full node is a computer
a second,
better version that runs the Bitcoin software.
It connects to 12 peers on the
network who also run the same
software, and together as part of
Left More
the ~7,000-node Bitcoin network
information is establish the global consensus on
provided on the
the block chain, the ledger of all
screen below
thedisplay Bitcoin transactions. That software
The pan-and-tilt
mechanism enables the
Camera Module to move
with 360 of freedom
Quick
Facts DISCOVERER
METAL-DETECTOR ROBOT
> The Discoverer
took nearly six
months to build
AMAZING
ARCADE
MACHINE
PROJECTS
Building your arcade machine is an amazing idea, and there are projects galore from
other makers. Follow in the footsteps of these builds to have your own coin-op at home
he Raspberry Pi has long been the beating
T heart of many an arcade machine project,
and the souped-up Raspberry Pi 3 emulates
coin-ops better than ever.
So if youve ever schemed and dreamed of your own
personal arcade machine, nows the time to put your
plan into action.
You might be pondering what type of arcade
machine youd like to build: a full-sized cabinet,
a bartop device, or a cool tabletop machine? Whatever
you choose, the Raspberry Pi community has your
back. There are designs and concepts for every
conceivable shape and size of arcade machine. Some
are incredibly detailed, others purely practical, and
most look plain fun to build (and play).
Most arcade projects run RetroPie
(magpi.cc/Retro-Pie) or PiPlay (piplay.org),
althoughthere are other options like Lakka (lakka.tv).
Building an arcade machine is an incredibly
rewarding project, and no matter what type of
machine you end up with, youre bound to enjoy using
it and showing it off to your friends.
56 TheMay 2016
Official Raspberry Pi Projects Book raspberrypi.org/magpi
TEN AMAZING ARCADE MACHINE PROJECTS Feature
MATT SHAW
Matt Shaw, is a keen gamer who
lives in Adelaide, Australia. He was
WINE
formerly a boilermaker and welder,
and has always had a penchant for
making things.
imgur.com/a/wzua5
BARREL
A piece of glass recycled from
A square cut on the top an old table is installed on top
of the barrel holds the of the screen and held in place
4:3 monitor in place with non-slip rubber edging
ARCADE
Drain a barrel of wine and turn it into
a Donkey Kong-style arcade table
We adore this grand Donkey Kong-style barrel
transformed into a tabletop arcade machine.
Built by Matt Smith, a gamer from Adelaide,
Australia, the Wine Barrel Arcade (magpi.cc/2gSiEt0)
is a surprisingly low-tech project. Theres no soldering,
and it uses crimps and block connectors to hold
everything in place. All youd need is a ludicrously
oversized barrel and space to store it.
Matt based the idea on an earlier project called A An MDF wood
Barrel of Kong (magpi.cc/1VwrzPK), although that The oak wine panel is cut to fit
barrel forms exactly around
project featured a JAMMA board (to accept original the cabinet. the wine barrel.
arcade machine boards).With a mind to do something The power lead The panel houses
runs from the the joystick
like that, I asked for a wine barrel for Christmas, he bottom, up the and buttons
says. Sensibly, Matt switched the JAMMA arcade board inside, and to the
control unit
approach of that project to a Raspberry Pi running
PiPlay (piplay.org).
With a wine barrel rolled into his workshop, Matt the buttons, joysticks, and wiring. These are all held
sourced an unloved 4:3 monitor and table glass
mounted on non-slip rubber. The only real cost was for
together with an MDF panel, cut to fit using an angle
grinder, circular saw, and jigsaw. According to Matt,
Youll
the whole build came in at around 90. Need
The guys at the PiPlay forum were amazing, and
still help me out (and anyone else that asks, it seems) > Wine barrel
today, Matt told Australian Kotaku (kotaku.com.au).I > 4:3 TFT monitor
love Wonder Boy, as its such fun and a long game, but > Joystick and
the Street Fighter II series [is] the best. Matt enjoys epic buttons
Street Fighter battles with his friends over beers. > MDF board
Its visually impressive, but the best thing about the
Wine Barrel Arcade machine is that despite the size,
its a relatively basic construction. We think this is one
The insides reveal the low-tech
way everything is connected up of the most impressive projects you can make and if
youve got the space, its sure to impress.
MICRO
a neat tabletop
PI
arcade machine
made from a clear
acrylic sheet so
you can view
the insides
NACADE
possible. It may look simple from the outside, but a lot
of engineering went into making it. After months of
development and eight printed prototypes later, its
finally ready.
The cabinet is 3D printed with nylon SLS (Selective
Laser Sintering). It needs to be printed with
nylon SLS, or else it wont work: it wont be strong Dont be shy! Show off your
enough, says Marco. You can buy a case directly from
Shapeways (magpi.cc/1S4FqXV).
Raspberry Pi with pride inside this
The controls are a GH7455-ND mini joystick and see-through arcade machine
nine 679-2431-ND tactile push buttons. Epoxy is used
to hold everything in place, and theres quite a bit of Who doesnt like gaming? asks Krimmy, creator
soldering in the project. A speaker is recycled from an of the NaCade. Having grown up playing arcade
old MP3 player to provide audio, and a 2.5-inch TFT machines, as a kid you could only dream of owning one.
forms the display. Now, with advances in technology, gaming is available
Its a fiddly project, but it uses widely available parts, to everybody.
and the case can be pre-bought. There are full details on NaCade (magpi.cc/1S4HSgV) is a naked arcade
Marcos Instructables page (magpi.cc/1S4Fw1I). machine case, displaying the Raspberry Pi powered
We think this is one of the cutest projects weve ever innards in all their glory. The display is a 7-inch LCD
seen, and its a superb way to creating a dinky arcade monitor recycled from a car reversing system. [The
machine thats fully functional. display] is sufficient enough for these low-resolution
games, says Krimmy, although the menus can be a bit
too small to read. I had to use a larger monitor when I set
it up.
I used an arcade-quality joystick and illuminated
buttons, which are wired directly into the Pi, he adds.
Just when you think the NaCade couldnt get any
cooler, Krimmy drops the solar panel on you. The solar
controller regulates voltage from an external source,
which in this case is a solar panel. Yes, its powered
by the sun!
Sure, there [are] plenty of consoles and handheld
units, even smartphones to choose from, but what
I wanted was the nostalgic feel of a stand-up arcade
without the need for a large room to put it in.
The portability is pretty handy, too.
The Micro Pi packs
a fully functioning
arcade machine into a
Coke can-sized cabinet
58 TheMay 2016
Official Raspberry Pi Projects Book raspberrypi.org/magpi
TEN AMAZING ARCADE MACHINE PROJECTS News
Feature
TOM ROLFE
Tom Rolfe is a writer
for TapSmart and
Swipe magazine.
tapsmart.com
GALACTIC
STARCADE
With clear instructions and a solid parts list,
this superb arcade machine is a rewarding build
The Galactic Starcade is a great bartop project that
Youll keeps the weight (and cost) down while providing two
sets of controls and a large 19-inch TFT monitor.
Need Built by Bristolian techie Tom Rolfe, the Starcade
(magpi.cc/1qOxaVh) is our tip for a solid arcade cabinet
> MDF board with clear instructions. Its a challenging project, but
> LCD TFT you wont get lost during the build.
monitor Ive always wanted an arcade machine for authentic The cabinet is made from The controls are an
regular MDF (medium- all-in-one unit with
> Joystick and retro gaming, reveals Tom, but they take up a lot of density fibreboard) cut to a USB interface and
buttons space and cost a lot of money. Making a custom bartop shape and glued together pre-crimped wires
> Heatsink for cabinet like this one solves both of those problems. It
Raspberry Pi also lets you play potentially thousands of games on a
> Plexiglas and single machine. This project costs under 200 ($280) to
flexible LED make, whereas a pre-built custom cabinet can set you
strip kit
back four or five times that amount.
What we like most about the Galactic Starcade is the
amount of detail in Toms instructions. Ive knocked
up full 1:1 scale printable guides for the side panels and
the control deck, plus a reference sheet with dimensions
and angles for the rest of the panels, says Tom. Youll
find this project easier to follow than many others.
The cabinet is made from painted MDF, and the
marquee is Plexiglas and a flexible LED strip kit. A
Raspberry Pi is used along with a heatsink to keep
things cool, and the controls are from Ultracabs
(magpi.cc/2gRjwOq). It uses RetroPie as the software.
Theres a few things I would do differently, but
overall Im very happy with how this turned out, A 19-inch LCD TFT A hinge on the rear of
says Tom. It proves that a little thing like the monitor with built-in the cabinet provides
speakers provides both quick access to the
Raspberry Pi can happily power a near video and audio output Raspberry Pi inside
full-size arcade machine.
SPANNER SPENCER
Spanner is the community
manager for Element14,
an online community
for engineers.
magpi.cc/1qODxb9
A square in
the table is
cut to contain
the 17-inch
display. The
wood is then
prised out
The cabinet is a repurposed to reveal the
Ikea Lack table, which saves structural
you the effort of making a filling inside
cabinet from scratch
PIK3A
Holes drilled
into the
surface
house the
joystick and
buttons. The
controls are
inserted from
underneath
The
controls are
Some ideas are pure genius, like this Ikea coffee connected to
an Arduino
table turned into an arcade machine Leonardo,
which
translates the
We love getting ideas in Ikea, but clearly not as movement
to keyboard
Youll much as Element 14s community manager, Spanner
Spencer, who had the genius to take apart an Ikea
commands
and sends
Need
them to the
coffee table and turn it into an arcade table. Raspberry Pi
Its an IKEA Lack coffee table with an LCD monitor
> Ikea Lack cut into the top, arcade controls next to the monitor,
coffee table
and a Raspberry Pi 3 and accessories buried inside,
> Raspberry Pi explains Spanner. There are clear instructions for joysticks and buttons on
and Arduino
He describes it as a minimalist, contemporary Element 14s website (magpi.cc/1qOxwLG). Drill 28mm
Leonardo
interpretation of the classic coin-op cocktail cabinet holes for each one, says Spanner. This is the standard
> Four-way ball-
that uses an IKEA coffee table and a Raspberry Pi 3. size for arcade buttons, and also gives the joystick plenty
top joystick
and buttons The display is an old 17-inch LCD monitor with a 4:3 of room to move without the hole being visible around
ratio (this shape is better to match the square table). the round, flat cover that comes with the joystick.
> 17-inch LCD
monitor The chassis is taken out of the plastic casing, and the The PIK3A uses an Arduino Leonardo
> USB computer
screen inside the shielding is the same depth as the (magpi.cc/1qOxyTQ) to interface the controls with
speakers Lack coffee table. This means that once youve got the Raspberry Pi. Its an interesting way to hook
the screen, all you need to do is drop it into the hole up the controls, and a lot easier than other
[you cut], says Spanner. implementations weve seen.
60 TheMay 2016
Official Raspberry Pi Projects Book raspberrypi.org/magpi
TEN AMAZING ARCADE MACHINE PROJECTS News
Feature
MINI ARCADE
Looking for the perfect scale arcade machine?
LEGEND OF ZELDA
BARTOP
Look no further There are lots of bartop
projects around, but
We featured Tiburcio de la thisLegend Of Zelda
Carcovas Galaga Pi project in (magpi.cc/1qOD3lx) is
The MagPi 44, but we couldnt one of the prettiest. Ive
do a feature on our favourite always wanted my arcade
arcade projects and not mention cabinet, says Phrazelle.
the Mini Arcade. Im glad I did because
Tiburcios miniature arcade the final build exceeded
machine reproductions (of my expectations by far.
which Galaga is just the latest)
remain the gold standard for
scale reproductions (they even
have small coin slots). Hand-
built from plywood and acrylic,
and with as many 3D-printed
parts as possible, they are a
labour of love. Reproduction is
probably beyond all but the most
dedicated of makers, but Tiburcio takes us through the build of Galaga
on his YouTube channel (magpi.cc/1V8XEvY)
So far hes built perfect reproductions of Space Invaders, Pac-Man, and
Galaga, with more to come. Theyre the most inspirational builds around.
ARCADE PI
This bare-bones arcade project
COFFEE TABLE PI
Graham Geldings Coffee Table Pi (magpi.cc/1qODcFy)
is one of the neatest arcade tables around. It also
has a huge 24-inch LCD screen and is sturdy and
is space-saving and great value childfriendly (with rounded corners and Perspex
Arcade Pi is alone in our list of favourite arcade machines in that it mounted over the screen).
isnt a complete build. Instead, it packs the Raspberry Pi inside a
BUBBLE BOBBLE
woodenbase containing the arcade stick and buttons.
We think the Arcade Pi (magpi.cc/1Q5gGw8) is a great option for
those looking to build an arcade machine, but not having the space, or
money, for a full cabinet build. Ive always dreamed of having an arcade We just adore
machine, says creator Sacha. Man, it takes a lot of space, and its Christopher Sadlers
expensive. I arrived at the conclusion that I had to build one myself. Bubble Bobble bartop
This project enables you to experiment with arcade joysticks and arcade machine
buttons and build a working arcade console in a much smaller space, (magpi.cc/1VwzpsM), if
and for a much lower price. for no other reason than
its lovely decals. All my
Like all great plans were based around
arcade sticks, you wanting to have artwork
should definitely
customise from my favourite game
the face plate ever: Bubble Bobble,
yourself
saysChristopher.
Quick
Facts MOTORISED
SKATEBOARD
> The project
cost $500 AUD
(298) to build
> The board can A university assignment allowed one student the chance to realise
currently reach
up to 15km/h his dream of building the latest in whizzy commuter gadgets
> Tim plans a
y now were sure youre the next best thing, albeit with a when we ask him if he had
B
battery and
ESC upgrade aware that e-boards have hefty price tag. considered any other directions for
> Build recipe officially become a thing. So when Queensland University his project. So when we were told
is available From knee-driven mini-Segways of Technology student Tim Maier about the task, it all kind of linked
on GitHub
and two-wheeled hoverboards was assigned with the task of up and I started to do my research
to standard motorised decks, the building something with a on what to buy.
streets are filled with wheeled Raspberry Pi, he already knew With a few requirements in
commuters. And while Marty what he planned to create. mind, Tim started researching
McFly may have failed to deliver Building an electric skateboard the perfect motor. He wanted
on the true hoverboard of our had been something on my mind to achieve an average speed of
dreams, search online for an for some time, as buying one was 30km/h to aid his commute, and
electric skateboard and youll find not a viable option, Tim explains, knew the motor would easily
TAKE TO
THE STREETS
>STEP-01
The power
The perfect motor was chosen Two LiPo batteries are connected in parallel to the
to reach speeds of up to 30km/h
ESC, taking approximately an hour each to charge.
They power both the motors and the Raspberry Pi.
be one of the most expensive Spurred by the positive response,
components of the build. Finally, hes provided the code and kit list
he decided upon a Turnigy on GitHub (magpi.cc/29Burv1),
Aerodrive SK3, matching it with and plans to also create an
two 2200mAh lithium polymer instructional video of an upgraded
(LiPo) batteries and a basic design for anyone wanting to
electronic speed control (ESC). make their own. The Pi Skate2.0
Despite having to rely on will house more batteries for
YouTube and assorted literature longevity, a higher-quality ESC
to educate him on how to utilise for greater speed and the ability
Python, the biggest hurdle for to brake, and possibly LED lights
Tim turned out to be the drive because, well, why not? And as
Quick
Facts THE INTERNET
OF LEGO
> Around 20,000
LEGO bricks
were used
CITY PLANNING
We love the detail
of the Internet of
LEGO city, with
citizens going about
their daily lives
>STEP-01
Regular LEGO
The Internet of LEGO is a Raspberry Pi-powered city
built from regular LEGO bricks and kits. These are then
given Internet of Things-style smarts, thanks to various
electronic components.
Multiple Raspberry
Pi, Arduino, and
BeagleBoard devices
are used to make the
Internet of LEGO work
of software to control all the member and runs Node.js automation scripts.
HAL 9000
djordjeungar.com
Quick
Facts
> HAL stands for
Heuristically
programmed
ALgorithmic Open the pod bay doors, HAL are chilling words to anybody who has
computer
> HAL is
watched 2001: A Space Odyssey, apart from one maker who decided it
rumoured to be
IBM with each
would be a good idea to build HAL 9000 for real
letter shifted
one backward
had this Raspberry PI
> The total
cost for the
I Model B waiting to become
something great, says
build was $99
(including the Djordje Ungar, and what greater
Raspberry Pi) thing can a computer hope for than
> All the parts to become the iconic computer
are off-the- from Stanley Kubricks 2001: A Space
shelf computer
Odyssey? I mean, come on!
components
The first time I heard
> The case
synthesized speech, I thought to
is laser-cut
acrylic covered myself: Wow, how cool would it be
in black paint if that was a voice of HAL 9000?
It was when I stumbled upon
Jasper, this amazing open-source
The case is made from project that allows you to control
3mm black acrylic
laser-cut into the right a computer with your voice, that
shape for HAL. It is I knew I had to make HAL.
spray-painted for a
professional finish Aside from the Raspberry Pi, all
the other parts are off-the-shelf
computer components that you
can buy online. I used a 3mm
thick black acrylic, and Ive painted
some parts to look metallic,
Djordje reveals. The box is 300
A stripped-down web 96 62mm, which is a bit larger
camera is fitted with than a tall carton of milk.
a camera lens. This
completes the HAL 9000 I examined a dozen movie stills
look, and the web camera from the film, he continues.
also provides the device
with a microphone I was only able to guess the actual
size of the original HAL, so I based
it off the lens. Some things like the
number of holes on the speaker
panel and the logo are spot on.
To allow HAL 9000 to see,
Djordje added a webcam and
A USB speaker is fitted camera lens. I wanted to find
inside the device near
the grille at the bottom. a super convex lens like the one
Jasper software provides from the movie, but lenses of that
HAL with a voice
calibre are anything but cheap.
Even the used ones were way too
expensive. So I had to settle for
>STEP-01
Stripping the webcam
A recycled Insten USB digital six-LED webcam is
stripped down. A red marker is used to paint the LEDs
red, giving the devices eye the same ominous glow
HAL has in the movie.
ZERO360
JAMES MITCHELL
James is a software quality
assurance engineer based in
Berlin. He also organises the
Raspberry Jam Berlin.
magpi.cc/2bgxXri
Facts
break into the mainstream,
whether its to try to improve the
way we experience things or make a
> There are eight bit of money. The quality, however,
Pi Zeros and varies wildly. At the moment, were
cameras
entering a new age of virtual reality
> The build took
(VR); this has created an interesting
a few months
new set of visual experiences that
> It currently
has inspired James Mitchell.
only sees 52
degrees of Recently, there has been a
vertical space rush of 360-degree VR videos
> The Pi 3s online, James tells us. Theyre
actually power really impressive. Loving the
the Pi Zeros
technical side of photography and
> James has the Raspberry Pi, it seemed only
also taken
logical that I would try and build
pictures of
the moon with something that would allow me
a Pi camera to recreate those videos using the
Raspberry Pi.
And so he did with the Zero360:
a bank of Raspberry Pi Camera
Modules arranged in a circle,
connected to Pi Zeros. They can
all take a photo at once; these are
then stitched together to make a
360-degree panorama.
Why make it out of Pi Zeros,
though? James explains that cost
was a big factor:
The issue is that the equipment The final version has been This build uses a set of
given a lovely red finish, Raspberry Pi Zeros (v1.3)
for making 360-degree videos is perfect for a Pi project for the camera connector
extremely expensive. Using the
Raspberry Pi, its a fraction of the
MAKING A PANORAMA
>STEP-01
Relay the command
The setup has the Raspberry Pi 3s command the Pi
Zeros to take their photos, rather than controlling
them directly from a separate computer.
>STEP-02
The wood for the construction was
laser-cut and was very easy to make,
according to James
Gather the photos
The photos from each individual Pi Zero are then
cost. You could argue that the of PiZeros, Camera Modules, and sent over the network to one of the connected
Zero360 is not really that cheap power cables.Im using Raspbian Pi 3s, rather than both of them.
when you could use your mobile Lite on all the Pis, with the raspistill
phone or even a DSLR camera, and picamera Python libraries,
but those would only take a single James explains. I also managed
still image and need a user to to stitch the images on the Pi 3
move the camera around, whereas using Hugin.
the Zero360 can take stills from Aside from some issues
all angles at the same time and with getting the networking
repeatedly. Those stills can be made going, the whole project is
into a time-lapse. Also, video is prettystraightforward.
an option! These features dont Code-wise, theres still a lot
normally come that cheap! of work to do, so I cant claim its
The housing for the system doing what it does efficiently,
was quick to make, once James admits James. But the final
had managed to procure enough results are amazing! Its especially
Raspberry Pi Zeros; however, the cool that the images are stitched
code took a few weeks on and off together on the Pi itself! >STEP-03
to get working. Two Raspberry James has plenty of plans Stitch in time
Pi3s are also used in the project to improve the Zero360 in the Hugin is used on the Raspberry Pi 3 to stitch all the
to stitchthe image together, and future, so it can make even images together. The Pi 3 is chosen for this as it
the build is otherwise just made up better panoramas. has a bit more power than the Pi Zeros.
BUILDING AN
For the Pi Zero, an
Adafruit I2S 3W
Class D amplifier is
EARTHQUAKE
required to supply
audio to the mini
external speaker
ALERT SYSTEM
>STEP-01
Vibrating motor
Taken from an old electric toothbrush, the vibrating
motor is connected to the Pi Zero via a breadboard
circuit, including a transistor and rectifier diode to
limit the current.
THE TABLET
photography, tweeting like a pro, and
winning things.
twitter.com/piboyuk
OCARINA
PROJECT
Ocarina players Robert and James
sought the help of teenager
Jonathan to build an interactive
touch tablet for reading music
hen Robert Mayfair met together, however, is often clouded On buying the book I realised that
Quick W eight-year-old James at a by the inability to truly share the the Braille book was of no use to the
Facts
party in 1994, he gave him experience; resources are limited sighted person, as it was like looking
the gift of an ocarina. James was for the visually impaired. at a landscape covered with snow.
blind, and so thankful for the gift Recently, Robert discovered that Aiming to find a solution, Robert
> The Rebel that he later contacted Robert and the Royal National Institute of found his answer far quicker
Makers Club
asked for lessons. A new bond was Blind People (RNIB) had published than anticipated when he came
runs once
a month instantly formed between the two. a Braille book of ocarina music, across a HackHorsham display in
Over the years of friendship, and though this was a wonderful a shopping centre last November.
> Jonathan
coded with the Robert and James have collected advancement in accessibility for The display, using pieces of fruit
Adafruit Python nearly 30 different instruments, the visually impaired, Robert to produce music via conductivity,
MPR121 library
with Jamess love for music ever- realised that sighted people gave him the inspiration he needed
> Jonathan used growing, especially toward the were unable to interact with to change the way he and James
his mobile
phone to
ocarina. The joy of learning music the content: read music together.
recordnotes
LEARNING THROUGH
TOUCH AND SOUND
>STEP-03
Learning the tune
When touching a set of pins, the HAT recognises
the note and the appropriate sound is played
through a speaker.
TORUS
unique shape
Quick
Facts
> When
assembled,
it measures
two metres
BUILDING A TORUS
TORUS lights up Amsterdams De
Marktkantine club with its blend
of film projection, light, and sculpture
>STEP-01
Making the pattern
The TORUS is made from MDF cut into 19
interlocking blades. These can be assembled and
disassembled, making it easy to transport to and
from a club venue.
Quick
Facts
> Watch the
WIZARD CHESS
set in action 19-year-old Bethanie Fentiman shocked her A-level classmates when she
at youtu.be/
Z7xdFn5bVrA rocked up with a fully working Harry Potter Wizards Chess set as her final
> The Wizard
Chess Tour coursework assignment
started in
Harlow ethanie Fentiman cant one can create when the literary runners, gears and, of course,
> After Harlow,
it visited the
B play chess, but when her
imagination sparked and
version includes battling chess
pieces that leave their opponents
the electromagnet that would
move each piece when required.
Covent Garden
Raspberry Jam
the opportunity presented itself, she crushed to rubble on the board. A 4tronix PiStep board, along with
brought the iconic game of Wizards Luckily for Bethanie, shes a two 28BYJ-48 stepper motors, took
> Inspiration
came from
Chess from Harry Potter to life using self-proclaimed Jambassador, up the job of moving the runners
Instructables a Raspberry Pi, stepper motors, and actively participating in the and electromagnet into place,
user maxjus at possibly a little magic. Raspberry Pi scene via the Kent linked through to the Raspberry Pi.
magpi.cc/
2il6A71
For her A-level computing Raspberry Jam. With a community As mentioned previously,
coursework, Bethanie took an idea of makers to support her, Bethanie Bethanie didnt actually know how
> Its wingardium
leviOsa, not that had been nestling in the back knew that she could complete the to play chess. So when it came to
leviosAH of her mind, and turned it into a build and got to work, researching inputting the legal movements of
reality. Well, as much of a reality similar projects online that used each piece, she had two options:
magnets and motors to magically learn fast, or cheat a bit. Opting
move chess pieces on a board. for the latter due to the time
After an internet search for constraints of her coursework
inspiration, she came across deadlines, Bethanie researched all
an Instructables build for an the possible moves of each chess
Arduino-powered chess-playing piece and worked them into the
robot by user maxjus, and used code. She could always learn to
the main concept as the basis for play the game later on.
her build. The guide provided all A second issue, and one far
the information Bethanie needed more associated with the original
The open sides of the build allow for an
interesting view of the working mechanism to build the physical structure of material from which she was
the board, allowing for drawer taking her inspiration, was what
>STEP-01
Setting up the runners
Runners allow for the motors to move the
electromagnet, and code dictates which pieces to shift
across the board. Here Bethanie could put her newly
discovered soldering skills to the test.
>STEP-02
When I turned up with the fully Etching the acrylic
moving and playable board at
Bethanie was fortunate enough to have access to
various pieces of equipment, although she admits
school, they were shocked that any future build would omit the added vinyl that
made movement less fluid.
the pieces would do as they took turned up with the board at school,
an opponent. In the book, each fully moving and playable, they
piece defeats its foes through were slightly shocked.
barbaric means. In reality, And they werent the only
Bethanie plans on an upgrade ones. Upon finishing her board,
to allow for movement around Bethanie took it to the Kent
pieces though once she gets her Raspberry Jam, where Twitter
belated invitation to Hogwarts, soon exploded with praise. From
were sure shell incorporate the the Jam, The Wizard Chess Tour
expected level of brutality. was born as Bethany and fellow
With the build complete and Jam members took to the road and
presented to her computing presented the project at Jams in >STEP-03
A-level class, Bethanies Wizard both Harlow and Covent Garden. Building the board
Chess was met with amazement. Now actively seeking an The entire build was a learning curve for Bethanie,
When I said I was going to make apprentice in the field, Bethanie allowing her to expand her knowledge of new skills
it, they just thought I was going to plans on upgrading the build while and to call on a number of Raspberry Pi community
write the code and come up with continuing the Wizard Chess Tour members forsupport.
designs for the board. So when I at more Jams in the future.
Quick
Facts
> The LEGO
contraption
took around
three evenings
MONOMEPI
A music box featuring old and new technology in perfect harmony
to build ith hammers hitting the He got the idea after seeing a presses on the Monome and
> Joons young
daughter
W bars of a toy glockenspiel
to play a tune, the
couple of videos of Arduino-based
music boxes a few years ago, while
lights them up accordingly. The
Pi then sends serial commands
added some
Monomepi sounds just like an working on a Conways Game of Life to an Arduino Uno connected via
extra blocks
old-fashioned music box, but this Pi project using a Monome Grid, a a ProtoShield kit to eight servo
> The hammers
are made from
Pi-powered contraption is based versatile piece of hardware that can motors, which move makeshift
coffee stirrers on new technology and on quite be used to control music and more. hammers to play glockenspiel notes
and LEGO a lot of LEGO. It was just my luck For the Monomepi, the Monome to match the pattern shown on the
> A Pi 3 runs that the components fitted with is connected to a Raspberry Pi 3 Monome. On the latter, the user can
the Python the LEGO bricks almost perfectly! running a step sequencer program, switch buttons on and off to alter
sequencing
software reveals its creator, Joon Guillen. which registers the users button the sequence as it plays.
BUILDING A
MODERN-DAY
MUSIC BOX
The contraption itself took I started out. The library has since
only two or three evenings to undergone several improvements
build, Joon tells us. I focused through the years.
most of my energy on the software While Joon opted to control his >STEP-01
side, so the physical construction servos via an Arduino, he says Glockenspiel hammers
was almost an afterthought. theres no reason why anyone To play the notes on a toy glockenspiel, the hammers
To build it, he borrowed a bunch creating a similar project couldnt are made from coffee stirrers, sticky tape, and LEGO
of LEGO blocks from his young trigger them from the Pi itself, blocks borrowed from Joons young daughter.
daughter. They were the first using a suitable motor driver board.
things I thought of using. I And if youre lacking a Monome
havent the talent for crafts, (quite an expensive piece of kit), a
and so LEGO was the quickest touchscreen could be used instead:
way to build the contraption. My A web-based UI should work, too.
daughter even added some blocks Or, if one isnt necessarily trying
of her own in there! to make a step sequencer, push
While the construction was quick, buttons or [a computer] keyboard
the project as a whole took around are viable control alternatives.
two months, with Joon working As a part-time musician, Joon
casually over the course of several plans to sample the Monomepi to
evenings and weekends. Most of it use in at least one of his tracks.
was figuring out the step sequencer Hes also looking to improve the >STEP-02
logic, Arduino code, and optimising project by adding features to the Arduino servos
performance. The main Python step sequencer program, such Eight servo motors are connected to an Arduino Uno
program running on the Pi is as having more than 16 steps, R3 and ProtoShield kit with a mini-breadboard. This
based on a Monome library Joon and the ability to use multiple is controlled by the Raspberry Pi and Monome Grid.
had created for his previous project. velocities. Other than that, I am
That took a very long time, as I trying to think of more ways to
had zero Python knowledge when use my servos with the Pi!
>STEP-03
LEGO construction
With the wiring complete, its time to connect the
Joon admits he was lucky that the servos hammers and add more LEGO blocks around the
fitted easily between the LEGO blocks,
servos to keep everything firmly in place.
albeit with a bit of paper padding
TEEFAX
Having worked as an engineer with
teletext equipment for the last 12 years
it was transmitted in the UK, Peter is an
expert in the field. When not recreating
teletext, hes out riding his bike through
the valleys of Stroud.
teastop.co.uk/teletext
Quick B world wide web, teletext a Raspberry Pi, connect its 3.5mm a low-cost basic teletext inserter,
Facts
was the best way of video output to a TV (via the SCART Peter manufactured his own VBIT
keeping up to date with the latest socket), then hit the teletext hardware and managed to get a
news, sports scores and other button on the remote control. full teletext service running on it.
> Peter built a information. The BBCs Ceefax Project founder Peter Kwan is Initially, there was a practical use
text service
teletext service continued in the a former teletext engineer who for the system. There is a lot of
for the Stroud
Fringe festival UK right up until analogue TV carried on working in the field hidden signalling in the teletext
transmissions ceased in October as a hobby. As the analogue TV signal, Peter reveals. The BBC
> New Teefax
contributors 2012. We still miss its no-nonsense network was being shut down, uses a system called Presfax which
are always approach and blocky graphics, I was thinking hides schedule information in
welcome
so were delightedthatteletext about how I could databroadcast packets. They also
> You can use has been revived by the Teefax generate my own have special signals that let
Peters wxTED
project. Users can install the free teletext, he London take over the whole
page editor
(magpi.cc/
2dsEZfG)
> Peter is
developing
a Muttlee
multiuser live
editing system
GETTING TELETEXT
BACK ON THE TELLY
>STEP-01
Above Along with news, Teefax pages include teletext art, quizzes, and some humorous
Teefax server
articles from the likes of Mr Biffo The Teefax server is an original Raspberry Pi
ModelB running Subversion and Apache web
network in an emergency. In only thing that the Pi cant do is
server. PHP scripts scrape the BBC News website
addition, betting chains use control overlaying from video, so things
and convert stories to teletext pages.
signals to switch TV channels or like subtitles and newsflash need
mute audio in their shops, while an original hardware VBIT.
European broadcasters use opt- The Teefax server is actually
out signals to insert local adverts. an original Pi Model B running
These all need testing and VBIT Subversion. Apache handles
was a low-cost and flexible way of user authentication. PHP scripts
generating these signals. triggered by Cron scrape the BBC
When the Raspberry Pi was News website and update the news
launched in 2012, Peter soon pages every day. Currently, there
realised it could be used instead of are seven authorised contributors
his bespoke hardware. It had I2C, to Teefax. The real number is more
SPI, and GPIOs to drive and it was because people are welcome to
cheaper than the AVR boards that I submit their own pages and designs
was using, so I hooked one up and and we will put them into Teefax for >STEP-02
it worked. I made a second spin of them. To do so, you can use Peters Pi client
the board and called it VBIT-Pi. wxTED page editor on a PC. With a client Pis composite video output
The next big breakthrough came Meanwhile, Peter is currently connected to a TV, teletext data is transmitted in
when Alistair Buxton managed working on a more flexible version normally unseen VBI (vertical blanking interval)
to create a teletext signal direct of the VBIT system with a much lines of the video signal.
from the video output of the Pi. I faster update speed. This actually
bypassed the teletext stream from has a commercial application in
my hardware to Alistairs software the betting industry where a small
and instantly halved the cost of a delay in reporting the off in a
teletext system, says Peter. The horse race can be costly.
>STEP-03
Teletext pages
Hit the teletext button on your TV remote to start
viewing the pages as normal. Page numbers
can be entered, or coloured buttons pressed
to switch sections.
SISYPHUS
Quick
Facts
> Each table is
made in the US
Controlling Sisbot
A Raspberry Pi is the perfect
computer to control the Sisbot
and create the works of art, but
it wasnt always that way. For
a very long time, all my motion-
control artworks were controlled
by Windows PCs running DOS,
says Bruce. In fact, three
still do, running every day in
their museums.
I dont like change when it
comes to something that works,
PRECISION BALL
The metal ball follows a
path created using similar
technology to a CNC machine
CONTROL ROBOT
>STEP-01
The Sisbot
Under the table is a two-motor robot called Sisbot.
This moves a magnet which pulls the steel ball
(sitting above the sand).
>STEP-03
Always on
Sisyphus has no on/off switch. When its plugged
in, it automatically calibrates and starts playing. You
connect to it with WiFi from a laptop or an iPhone
app. From the app, you can control the speed of the
Sisbot and the lighting of the table.
These custom-made
motor control units feature
12V relays and TIP 120
Darlington transistors
Connected to an actuator
arm by a cord, each loom
harness is lifted and lowered
in sequence
Quick
Facts
> The loom took
Fred a year
to build
BUILD A
PI-POWERED LOOM
>STEP-01
Fred Hoefler shows off his hand-built,
Pi-powered loom see a video of it
Frame and motors
working at youtu.be/QjqJOdjmbAY Attached to the hand-built wooden frame with metal
brackets, the four 12V motors are linked to actuator
arms, with cords running via a pulley system to lift and
lower the harnesses.
OP
T EN
T
PET TECH
PROJECTS
Create something for your critter with these amazing Raspberry Pi projects for pets
e love to see cool projects that combine
W technology and cute critters here at Raspberry
Pi Towers. After all, pets are family, and
we love Raspberry Pi projects designed around our
four-legged (or more) friends.
There have been some great examples over the
last few months, so we thought itd be a great idea to
herd them all into one giant feature to show you our
favourite pet-themed projects.
Raspberry Pi builders are a quirky bunch, and weve
got pet projects for all kinds of pets. Cat owners will
love Jaspers Cat Exercise Wheel, David Bryans Pi-
Powered Cat Feeder, and John Shovics MouseAir.
Dogswill go all waggy-tailed for Matt Reeds Sniffur or
David Hunts Pi-Rex.
Some of the best projects here put animals on social
media: Kate Bevans Tweeting Cat Flap and Henry
Conklins Twitter for Dogs both allow pets to interact
online (by moving or barking).
Weve also included a cool project for smaller
creatures. Will McGugans Beetlecam monitors the
nocturnal movements of elephant beetles.
There are some super projects here, so put some
food in your pets bowl and settle down to figure out
what to make.
JOHN SHOVIC
Dr John C Shovic is the chief technical
officer and co-founder of SwitchDoc
Labs. He has also served as a Professor
of Computer Science at Eastern
Washington University, Washington State
University, and the University of Idaho.
MOUSEAIR
Raspberry Pi Camera to detect nearby cats
YOULL
NEED
> Pi Camera Module
BARK
When Oliver barks,
his speech is picked
by Bark Detect and up
tweeted online
FLAPPY MCFLAPFACE
Daphne announces her arrival to Left A generative
grammar Python
the whole world every time she program creates
tweets for the
saunters through her cat flap Flappy McFlapface
All cats think theyre special, but only Daphne has her
very own Twitter-enabled cat flap that heralds her arrival
online. The Flappy McFlapface project snaps a photo and
tweets it, along with a cute randomised phrase.
Built by Bernie Sumption, this cat flap is a thing of
beauty. Daphne often takes to social media to rant
about the inadequate service provided by her staff
(tech journalist Kate Bevan), explains Bernie on his
blog (magpi.cc/1VKui85). This activity is cathartic
and highly recommended for any household pet.
Unfortunately, Daphnes cat flap was until recently The Raspberry Pi uses a generative grammar
mute, and couldnt tell the world about its thoughts programto create a tweet for Daphne. It works by
and feelings. taking a standard sentence structure and replacing
A 3 reed switch from Maplin provides the input. nodes in the sentence with one of several options,
This is wired to the GPIO sensors, using a couple of says Bernie. Tweets include Most exquisite Daphne,
resistors that prevent the Pi from being damaged by how soft is your magnificent fwuff. I can expire
drawing too much current. The reed switch is duct- without regrets, and Oh my! Its Daphne, how noble
taped to the cat flap so that when Daphne walks is your imperial demeanour. No wall-mounted fixture
through, the voltage on a GPIO pin changes and the could be luckier than me. You can follow Flappy
software can spring into action. McFlapface on @DaphneFlap.
An audio detector circuit kit from Maplin is The door is connected to a weight via a
hacked into the Raspberry Pi. This detects pulley system. When the actuator is pulled
PI-REX
Lexis barks and sends a signal to a GPIO pin back, the door automatically swings open
YOULL
NEED
> Central door
lock actuator
> Motor driver PCB One dogs bark is enough to open doors on command
avid Hunts dog Lexi has her very own door. David decided to build a bark-activated automatic
D The Raspberry Pi inside Pi-Rex listens for
Lexis bark and opens the door for her.
door opener. A noise detector circuit is wired to the
input of the Raspberry Pi to detect barks. A motor
Sleep deprivation has been driving me mad, says driver circuit drives the actuator that unlocks the
David. Its all down to a new member of the family, door, and a weight and pulley system swings the door
our new dog. She [Lexi] barks at night when shes open when its unlocked.
left out. She barks early in the morning when shes I picked up the audio detection circuit in Maplin as
left in. a DIY kit, David tells us. I probed the audio
sensor with a voltmeter; when thevolume
into the microphone was at a decent level, I
saw about 3-3.5 volts at one point, so I hooked
that directly up to the GPIO on the Raspberry
Pi, and it worked beautifully.
I had a few pieces of metal lying around,
and an angle bracket which got around the
concrete blocks nicely to meet the door lock.
I added a couple of bearings to reduce the
friction on the mechanism; I didnt want to
burn out the actuator. When it was built it
was still a little stiff, so I greased it up and it
was then moving nice and smoothly.
Now whenever Lexi barks, the door
opensautomatically to let her into the
house(magpi.cc/28KAM3z).
RICHARD HOPKINS
Richard Hopkins is an IBM
Distinguished Engineer in the UK.
He is the co-author of a book called
Eating the IT Elephant.
BEETLECAM
Monitoring nocturnal insects with a Raspberry Pi Camera
Elephant beetles may not be the most strokeable pets, in the morning they have rearranged the branches
but Will McGugan is a freelance software developer in their tank.
in Edinburgh who loves them all the same. These Will wanted to make use of the Pis Camera Module
insects are mostly nocturnal, he tells us. During to create a webcam. I also wanted to be able to create
the day, they tend to burrow under their bedding time-lapse movies, because I didnt want to watch 12
material or hang out on a branch. But during the hours of video to see what they get up to at night.
night, they can be quite active. I know this because The result was Beetlecam (magpi.cc/22MLURG).
SNIFFUR
Keep track of your pet, using beacons
to triangulate their position
We looked at Matt Reeds Sniffur project in
The MagPi 42, and its still an impressive piece of kit.
Sniffur uses a Bluetooth beacon and Raspberry Pis
to triangulate the position of Bean, the dog at Matts
office. But all dogs like to get out and play. When
[greyhounds] do, theyre very hard to catch because
theyre so fast, says Matt. The need to know where
she is at any moment and see if shes close to the
front doors is the reason Sniffur was built.
Three Raspberry Pis are used to monitor the beacon
device attached to Beans collar (magpi.cc/28L5NIe).
CATWHEEL
The
Raspberry Pi
periodically
activates
servos that
dispense
food into the
cats bowl
Build a giant hamster wheel
for your moggy
We looked at Jaspers Cat Exercise Wheel in The MagPi
45, and its still one of the coolest pet tech projects
around. This giant mechanised wheel uses a laser
pointer to attract cats, and then a motor turns the
wheel (youtu.be/dbPTwewy1SA). The Pi gathers data
on motion and reports back via a web interface.
PETBOT
Keep an eye on your pet with
this open-source robot
PetBot (petbot.com) is the only commercially available
project here, but dont worry: its all open-source, and
youre free to use the source code to build your version
(or buy a pre-built kit). PetBot trundles around the
floor of your house and enables you to interact with
PI-POWERED
your pets from afar. It comes with a remote-controlled
webcam, image recognition software, and treat
dispenser, and is powered by the Raspberry Pi.
CAT FEEDER
Play with your
pet remotely with
PetBot, a robot
designed for
pet interaction
TUTORIALS
Get making with our expert guides and learn how to make the project of your dreams
112 102
122
134
138
Tutorials
98 INCREDIBLE 132 MAKE A
PROJECTS TWEET-O-METER
Warm up your making Want to know how
skills with these popular your tweets
projects of varying are? Build this circuit
difficulty levels
134 CREATE A PROJECT
110 COMMAND LINE PI STATUS LIGHT
Get to know what you Make sure you always
can do in the terminal know how far along your
with our CLI taster software project is
BUILD AN
Michael Horne and Tim
Richardson run the Cambridge
Raspberry Jam and are active
members of the Raspberry
Picommunity.
camjam.me
EASY ROBOT
Get a CamJam robotics kit and make a wheeled rover in an afternoon
uilding a robot is a dream Tim Richardson, the guys who run batteries, as cheap ones often
B for many new Raspberry
Pi owners, and its
CamJam and Pi Wars.
Inside the box, you get a
dont have enough juice to move
the wheels.
way easier to get started than custom motor controller made The kit comes with two sensors:
you think. by 4Tronix (4tronix.co.uk). This an SR-04 distance sensor and a
One of our favourites is the sits between the two DC motors line-following sensor. The only
EduKit 3 Robotics by Cambridge and a battery compartment, thing you dont get is a chassis.
Raspberry Jam. The kit is which takes four AA batteries This is part of its charm, though,
designed by Michael Horne and make sure you buy high-quality as you can build a robot out of
any box capable of containing the
Raspberry Pi. Its even possible
to use the box that all the
components come in.
What makes the CamJam
EduKit3 better than other
robotics projects is the quality of
the instructional material. There
are ten different worksheets,
covering everything from building
the robot to driving the motors
and setting up the sensors.
BUILD A NES
FROM LEGO
Make a retro gaming console from toy bricks
Intermediate
DAN KING
Dan is a software
developer and
digital designer from
Syracuse, New York.
CREATE
magpi.cc/2mJz9e4
A WALL
DISPLAY
Turn an old monitor or picture
frame into a connected wall
display with DAKboard
ooking up a Raspberry
YOULL H Pi to a monitor is one of
NEED the easiest things to do.
In fact, thats pretty much what
> Raspberry Pi you do when you first set up a
computer (plus Raspberry Pi.
WiFi dongle,
Thats one of the things that
if using the Pi
version 1 or 2) makes DAKboard such an enticing
project. DAKboard is a gorgeous
> 8GB+ SD/micro
SD card web interface that displays
> Micro USB
photographs, weather and other
charger (for information (such as events
Raspberry Pi) from your calendar or Wunderlist
> Power todo list).
extension cord Start with a fresh installation
> Photo frame of the Raspbian OS on your
wire Raspberry Pi.
Begin by connecting to a wireless
network. Click on the networking
Challenging
An AdaFruit touchscreen is held
firmly in place with two rubber bands
(red and blue). This enables you to
control the device out in the field
MAKE
PINOCULARS
The PiNoculars project is an excellent way to recycle an old pair
of binoculars into a high-tech zoom recording device
he Raspberry Pi Camera Created by digital maker Josh
YOULL T Module is a great tool for Williams, PiNoculars are a regular
>STEP-01
Set up the camera and touchscreen
First, attach a Camera Module to your Raspberry
Pi board and set up a capacitive touchscreen
detailed instructions for two different doesnt have to be perfect, but try to display. This will enable you to control the project
types of PiNoculars. One follows the position the camera mount as close to on the move.
duct tape and foam route, while the the centre of the eyepiece as possible.
second is a more complex build using Josh then uses rubber bands >STEP-02
laser cutting to create a mount for the to hold the Raspberry Pi and Attach the camera
Raspberry Pi and touchscreen. screen unit in place on top of the Cut out a foam circle the
I used Adafruits [PiTFT] binoculars, and duct tape to fix same size as the eyepiece
capacitive touchscreen, says the binoculars and Raspberry Pi on your binoculars (it needs
Josh. Their tutorials made it together. Be careful not to crush to cover the eyepiece
incredibly easy to attach to the Pi your LCD, he says. More duct tape completely). Mark an X in
(magpi.cc/2mCpVy3). Josh suggests is used to attach the foam mount the centre and draw an 88mm
square in the centre of the circle. Push the
that makers read Adafruits DIY WiFi over the PiNoculars eyepiece.
Camera Module into the foam and position
it in front of the eyepiece.
There are a number of people
whove combined the Raspberry Pi >STEP-03
Fit it together
with microscopes and telescopes Use rubber bands to hold the Raspberry Pi and
touchscreen display vertically on top of the
Raspberry Pi touchscreen camera Then its just a case of moving binoculars, with the screen facing towards the
tutorial by Phillip Burgess and the everything around until it is firmly eyepieces. Now use duct tape to secure the
Ruiz Brothers (magpi.cc/2m9Bxfv). fixed, and the camera can record a Raspberry Pi firmly, and a smaller piece to secure
The most time-consuming part well-defined circle. the foam-encased Camera Module. A portable
of the build is creating a mount that If youre a perfectionist, theres power back enables you to take the PiNoculars
wraps around the pair of binoculars, a much more detailed method, out in the field for long-range video recording.
but you can skip all this by using involving precision design with
foam and duct tape. Inkscape (inkscape.org) and a laser
After setting up the Raspberry cutter. But we like a quick hack, and
Pi with the Camera Module and this is a great project for making
Adafruit touchscreen, the whole kit something quick and impressive.
is mounted on top of the binoculars. There are a number of people
The first step is to mark up and whove combined the Raspberry Pi
cut out a circle of foam. This serves with microscopes and telescopes,
as a mount for the Pi camera, to hold says Josh, whos fascinated by them.
it in front of the eyepiece. Remember to measure twice,
The camera mount should barely he warns us, and callipers are
cover the eyepiece, says Josh. It beautiful tools.
Challenging
MAHMUT
Mahmut is a computer
engineer and maker.
He is working with
his friend, Metin, on
Sixfab Raspberry Pi
BUILD A
4G/LTE projects.
magpi.cc/2nSlpvp
YOUTUBE DRONE
Add a Camera Module to a drone to broadcast footage straight to YouTube
his smart drone broadcasts Pi with network coverage lets you Set Make Yourself Drone Kit
UK DRONE LAW
The UK Civil Aviation Authoritys The
Drone Code is a guide to flying drones
for fun (magpi.cc/2nRZAw2).
STREAMING
LIVE VIDEO
>STEP-01
Set up the shield
A Sixfab 4G/LTE shield is connected to the
Raspberry Pi. This provides a persistent data
connection, enabling the Raspberry Pi to stream
data to YouTube and other websites.
PICADE
magpi.cc/2nSOfvv
180
$238 PIRATE RADIO
magpi.cc/2nSEOfE
40
$50
Creating a retro arcade system is a dream for many This kit has everything you need to create a
makers. Building a cabinet from scratch can be a radio with your Raspberry Pi. It contains the
costly and difficult enterprise. Picade makes it all new Pi Zero W and a pHAT BEAT (DAC and
a lot easier, though. Its powder-coated cabinet stereo amplifier). You also get a 5W speaker.
feels like a real arcade cabinet. It comes with a PCB, The plastic case has a VU meter so you can
joysticks, and 12 arcade buttons. view the sound levels. You will need to solder
the GPIO header on to the Pi Zero W, and a
female header to the pHAT BEAT.
PI-TOP
pi-top: 215.98 / $284.99
pi-topCEED: 109.99 / $164.99
pi-top.com
The pi-top and pi-topCEED are
projects to turn your Raspberry Pi into
a laptop or desktop computer. Unlike
a regular laptop or desktop, these are
module DIY computers that are ideal
for mobile making. You can 3D-print
the case and buy the components,
magpi.cc/2nSXHPs
If youre looking for a retro PI ZERO CCTV KIT (LITTLE BRO) 24
gaming console, then look at this
magpi.cc/2yFOcMv $32
Retro Gaming Bundle from The
Pi Hut. It contains a Raspberry Start your mini surveillance state with this
Pi 3 and two SNES-style USB sign that houses a Pi Zero and a Camera
gamepads. You also get a long Module. The camera logo on the sign has a
HDMI cable, an official Raspberry hole for the Camera Module. You need to
Pi power supply, and a 16GB SD buy the latter separately, but can combine
card. All you need to do is install it withOpenCV computer vision to create a
RetroPie (retropie.org.uk). smart CCTV Camera that recognises people.
DIDDYBORG
like your average turtle
robot. It can raise or lower
the pen to draw shapes
on paper. Turtle robots magpi.cc/2mHbmbp
have a long history There are many robotics kits for the Raspberry
in computing and maker Pi, but PiBorgs DiddyBorg is perhaps the most
culture, and theyre a great project for comprehensive. It has a robust laser-cut chassis
learning logic (and to see code in action). with six 60rpm motors. The DiddyBorg comes with
a PicoBorg Reverse motor controller and a BattBorg
naturebytes.org 32.99
If youve ever wanted to record the
critters in your garden, then the
Wildlife Cam Kit is the way to go.
MEARM $43.54
Its PIR sensor detects movement
magpi.cc/2nSOlDo
and triggers the Pi Camera Module Not all robots have wheels. The MeArm is a flat-pack
to take a stealthy snap. Its ideal for robot arm kit that you build. It can then be controlled
educational use. The Cam Kit is also via Python or directly with a joystick. Its very easy to
very versatile and can be used for assemble, using just a screwdriver, and we think this
time-lapse photography, night-time is a great kit for anyone wanting to step into the world
shots (with a Pi NoIR camera and IR of digital making.
LED lighting), or even a live video feed.
LIV PI
livpi.com
189
$250
LiV Pi comes from Hong Kong, where pollution has been a problem
for many years. With air quality increasingly a concern in cities across
the world, its a great way to learn more about pollution (and keep an
eye on levels in your area). Inside the kit are three sensors: carbon
dioxide, temperature/humidity, and air pressure. Its not a cheap
project, but it is a professional air-monitoring system.
COMMAND LINE PI As close to perfect as Raspbian is, things can go wrong. In this tutorial,
Youll we learn that theres no need to turn the Raspberry Pi off and on again:
Need just kill the process!
> Raspbian
ver lost the off switch for a program? The ps aux listing has various headers, including
raspberrypi.org
/downloads
though most
E Sometimes software youre running seems
to have no inclination to stop: either you
the USER which owns the process, and the PID
(process identification number). This starts with 1 for
of the tutorial
will work with
cant find out how to quit, or the app has a problem init, the parent process of everything that happens in
the command and wont respond to your q, CTRL+C, or whatever userspace after the Linux kernel starts up when you
line running the command should close it down. switch the Pi on. Knowing the PID makes it easy to kill
Linux default
Bash shell
Theres no need to panic, and certainly no need a process, if its the easiest way of shutting it down.
on any GNU/ to reboot: just identify the process and quietly kill it. For example, to kill a program with a PID of 3012,
Linux PC Well show you how, and look at what else can be done simply enter kill 3012. To quickly find the process
with knowledge of processes. in the first place, use grep on the ps list. For example,
locating vi processes:
Processes
Find the many processes running on your Pi with the ps aux | grep -i vi
ps command. On Raspbian, its usually called with
the a and x switches which give all processes, rather The -i (ignore case) isnt usually necessary, but
KEEP ON than just those belonging to a user, the u switch shows occasionally a program may break convention and
RUNNING processes by user, attaching it to a tty. w adds wider contain upper-case letters in its file name. You
nohup is output, and ww will wrap over the line end to display can also use killall to kill by program name; for
useful for a information without truncating. example, with killallfirefox.
program that
will be running Type ps auxww to see, then try with just a or other
for some combinations. Youll notice that these options work Piping commands
time in the without the leading dash seen for other commands. Naturally, you can pipe pss output to select the PID
background
perhaps a Both the lack of dashes, and the letters a and x, date and feed directly to the kill command:
sensor project back to the original Unix ps of the early 1970s; this was
youre working maintained through various revisions by one of Unixs kill $(ps aux | grep [f]irefox | awk
on until you
feel happy two family branches, BSD, and baked into the first GNU/ {print $2})
enough to add Linux ps. Unixs other branch, System V, extended and
it to Raspbians changed ps with new options and new abbreviations for We dont have space for an in-depth look at awk
startup
processes. command switches, so for ps ax you may also see ps -e (were using it here to print the second field of greps
(or -ef or -ely to show in long format). output, the PID), but the [f] trick at the beginning
GET DROPBOX
Dropbox folder
ON RASPBERRY PI Connect to the most ubiquitous cloud service on your Raspberry Pi,
Youll perfect for uploading pictures and video in a project!
Need ropboxs relationship with Linux has always and upload files from the browser. So if you want
> Dropbox account
dropbox.com
D been slightly weird, and as Raspbian is a
version of Linux, that too means its not so
to download anything to the Raspberry Pi, it can be
quick and easy to go through there.
> Dropbox straightforward to get the file-syncing behaviour of
Uploader Dropbox to work. There are definitely ways around this, >STEP-02
magpi.cc/
2aaHoJN
though, and with a little bit of hacking and tweaking, Get Dropbox uploader
we can get automatic uploads (and downloads!) of items Boot into Raspbian if youre not already using it, and
> Your Dropbox
to Dropbox. This method was created by Alex Eames of either open a Terminal or SSH into the Raspberry Pi if
API key
RasPi.TV and is perfect for many types of Raspberry Pi you prefer. From there, youll need to download the
project, especially those where youre taking pictures install files with:
and want to view them remotely or free up some space
on the Raspberry Pi after theyve been taken. git clone github.com/andreafabrizi/Dropbox-
Uploader.git
>STEP-01
Get a Dropbox account Once thats downloaded, youll need to move to the
If you dont already have one, sign up for a Dropbox folder (cd Dropbox-Uploader) to begin installing.
account at dropbox.com. It offers a couple of GB for You can start this off with:
free, but you can pay a small amount a month for a
whopping 1TB of space. There are some other cloud ./dropbox_uploader.sh
services around, such as Google Drive, but they have
even less Linux support than Dropbox. As with most It will ask for your API key, which is our cue to move
cloud storage services, you can view, download, onto to the next step.
FREEING
UP SPACE
In a Bash or
Python script
using the
function, you
can always set
it to delete the
upload once
it's sent, to
free up space
on the Pi.
Left Creating an
app on Dropbox
is easy; just make
sure it has a unique
name so you can
get it working
>STEP-03
Find your API key
You need to head to the developers section of
Dropbox (magpi.cc/2aaQnKQ) so you can create a new
app and get a unique API key to use on the Raspberry
Pi. Click on Create App to start.
As were working towards a personal use application,
the first option well chose is Dropbox API rather than
business. The next two options dont really matter: if If this line ends with =0, then change the 0 to a 1 and Above From the
Terminal, all
you want to access full Dropbox, you can, but it may save the file. There are also some other options under you need to do
be better for privacy and security reasons if youre just Default values (such as the ability to skip existing is download the
project to begin
able to use a specific folder on your Dropbox. Finally, files), so have a quick look and see if theres anything with: it's just a
name it whatever you want and click Create App. else you feel confident to change. simple git request
>STEP-04 >STEP-06
Enter your API key Start uploading!
On the settings page for the app you created, there Now everything should be working and you can
will be an App key field. Note it down or simply copy startuploading. Everything revolves around the
and paste it in into the Terminal if youre still on your dropbox_uploader file, so stay in the folder or make
Raspberry Pi. It will then ask for the App secret, sure to have your code point towards the folder in the
which is right below the key in your settings page. future. The code to upload is something like:
Click on show and then enter that. It will then ask
you to confirm what type of permission you gave it ./dropbox_uploader.sh upload path/to/file
(full or just a folder) and then it will drop a link to put dropbox_filename
in the browser to confirm everything. Press ENTER to
finish the setup and if everything has gone correctly, You can use this code in Python 3 by creating an OS
it will flash up a message to let you know! call, using something like: OTHER
COMMANDS
>STEP-05 from subprocess import call As well as
Add a progress bar Upload = "home/pi/Dropbox_Uploader/ uploading, you
can use it to
Without a progress bar, you wont always know if dropbox_uploader.sh upload path/to/file download files.
everything is working. Luckily, you can add one to dropbox_filename" A full list of
thisproject: open up the installed file we just used call ([Upload], shell=True) commands is
at: magpi.cc/
(nano dropbox_uploader.sh) and look for the line 2aaHoJN
that says SHOW_PROGRESSBAR under Default values. Time to get uploading and experimenting!
VOICE
Tinkerer, sometime maker,
other-times cosplayer, and
all-the-time features editor
of The MagPi.
magpi.cc
ON YOUR PI
sudo apt-get install vlc-nox vlc-data
Youll I on Netflix, reminding us of the desire to ask Next, its time to download the Alexa files we need:
Need
the computer for Earl Grey tea or Klingon
coffee (we cant start the day without a raktajino, you git clone https://github.com/amzn/alexa-avs-
know). So its exciting to see Amazons Alexa is quite raspberry-pi
> Alexa AVS readily available on the Pi now. Lets get it working,
magpi.cc/
2boDnjB then, and make some projects. Now we need to install our dependencies: Node,
JDK, and Maven. In the terminal, enter:
> A constant
internet
Speak into the
connection mic and ask curl -sL https://deb.nodesource.com/setup | sudo
> External speaker
Alexa for things, bash -
like a song in the
> A USB key of G with a
microphone fast tempo And let it work. It will end by prompting you to
install Node.js. Do that with:
npm install
./install-java8.sh
RCA OUTPUT
FOR YOUR PI ZERO
Did you know that the Pi Zero has a composite video out port which is very easy to access?
If youd like to connect your Zero to an old TV, read on and well show you how
n this simple, easy-to-follow tutorial,
Need
Zero to a TV via an RCA cable. Thats right
believe it or not, the Pi Zero isnt limited to just
HDMI video. By soldering a header pin, hooking up a
> Pair of header couple of jumper wires, and adding a screw terminal
pins
RCA connector, you can easily access the RCA video
magpi.cc/
1U76ZW3 output so you can use an old CRT TV in your next
Raspberry Pi project.
> Male-to-female
jumper wire Were going to be soldering two pin headers onto
magpi.cc/ the Pi Zero. Start by soldering a pin header to the
1U774sY
square pad labelled TV on your Pi, then solder
> Screw terminal another header onto the circle pad next to the square
RCA
pad. Both pads are contained within a white outline.
magpi.cc/
1U776AV See Fig 1 for reference.
Fig 1 The header soldered to the board You could solder wires directly to these pins, but
by using pin headers you get a nice neat solution that
There are two lines in the file that you need to edit.
Firstly, you need to remove the comment # from the
following line:
#sdtv_mode=2
sdtv_mode=2
hdmi_force_hotplug=1
# hdmi_force_hotplug=1
MAKE A
RASPBERRY BERET
Well add some wearable electronics to our hat: music, lights, camera,
Youll and some 3D prints in a digital homage to Prince
Need or some people hearing about the You could also find the IP via the graphical interface,
> A hat ideally
a beret
F Raspberry Pi for the first time, a certain song
entered their head. This earworm turned out
a smartphone app (such as Fing), Bonjour via Mac,
via a router admin page, or a tool such as Nmap.
> Piezo buzzer to be the eighties classic Raspberry Beret. Its now
magpi.cc/
28IjuBH
become more poignant with the untimely departure >STEP-02
in April 2016 of legendary musician Prince. Making the sign (of the times)
> WiFi dongle As far back as August 2011 in the forum, there was If you have access to a 3D printer, you can creatively
magpi.cc/
even a merchandising suggestion of a Raspberry (Pi) spruce up the hat with some colourful 3D prints.
28IjAsZ
Beret. Since nothing came of it, were going to hack our Prince famously became associated with a shape,
> Battery packs (5V
hat for some fun adding colour, sound, and vision. later known as the Love symbol, even replacing
for Pi; 5-9V for
NeoPixels) his name at one time. We easily found a vector
> Camera Module
>STEP-01 graphic (SVG) online (magpi.cc/28Ii66C), as created
magpi.cc/28IjIsz Prepping the Pi by onebeartoe. Bringing the file into Tinkercad
> Pisoundo
We start out with a fresh installation of Raspbian. Use (tinkercad.com), via Import URL, giving it a height
package, the WiFi dongle to connect to the network. Make sure in the process, allows us to generate a 3D printing
originally from everything is up to date: file. We rescale it so our NeoPixels shine and our
onebeartoe
magpi.cc/
camera can shoot through it. We must then generate
28IjRMy sudo apt-get update && sudo apt-get upgrade our final G-Code file to be printed.
> Rpi_ws281x
library from jgarff Take note of the Pis IP address: >STEP-03
magpi.cc/ What it sounds like when piezos cry
28IjT6X
hostname I The piezo is no simple buzzer. Much like phones
of old, we can program it to play very basic tunes,
Well then be able to work remotely via SSH, and although dont expect quality its more like a
later point our smartphone or web browser at the Pi. novelty musical Christmas tie than high-fidelity.
>STEP-04 LE BERET
Add some lights BASQUE
Having hooked up our individual NeoPixels, as per
the diagram, we need to carry out the following The beret is
commands to get our lights on and flashing. often thought
of as French,
but for us its
sudo apt-get install build-essential usually more
python-dev git scons swig associated
specifically
https://github.com/jgarff/rpi_ws281x.git with Basque
cd python regional
sudo python setup.py install tradition.
In the example given, we see three NeoPixels, but (magpi.cc/28InKFJ). Dont forget to activate the
you can choose to add as few or as many as you want camera via the Configuration menu on the Interfaces
(individual, rings, or strands). To configure this, type: tab. Heres a simple installation method:
Youll
Need RASPBERRY PI
> Lisiparoi LED
light ring
NIGHT VISION
CAMERA HACK
(infraredversion)
magpi.cc/
1SQVFrW
> Cyntech
Raspberry Pi case
magpi.
cc/2ipch47
> Raspberry Pi NoIR Have a spare Raspberry Pi Model B lying about? Turn it into a night-vision
Camera Module
LESS IS
MORE
You can always
cut more, but
you cannot
replace what
is gone. Think
about this
As the old adage goes, measure twice, cut once. when drilling
If in doubt, cut smaller and file away to fit and filing!
AQUAPI-CAM
Youll
Explore the underwater world with a Raspberry Pi camera
Need >STEP-01
T
here are plenty of underwater sports cameras
available, but they can be quite expensive, Find a suitable container
especially if you want to control them remotely. This needs to be watertight and have at least a see-
> A transparent,
waterproof box In this tutorial were going to use readily available Pi through lid. You can find Tupperware boxes with a very
magpi.cc/ add-ons to make a cheaper, customisable camera unit. tight seal, but these tend to be translucent rather than
2e8beBX There are lots of options and alternative sources of transparent. The size of box will probably determine
> Pi Camera components for a project like this. For example, the your choice of Pi and power source. Zeros are great as
Module
Pimoroni Enviro pHAT is a really useful option that theyre so small, but then youll need a WiFi dongle and
> Portable power can report back information about the environment shim. You can also save space by using a LiPo battery
source
in which the camera is operating, especially how instead of a power bank, although youll need a boost
> hostapd and much light is available. Theres a fair bit of software regulator too, such as the Pimoroni Zero LiPo.
dnsmasq
configuration involved, but example config files are in
packages
denyinterfaces wlan0
Above left You'll still have to get pretty close to the water yourself
to the end of your /etc/dhcpcd.conf file. Next,
Above right The web interface shows environmental information
create the /etc/hostapd/hostapd.conf file, usingthe and lets you control the camera
example in this tutorials GitHub repository as
a template. Change the interface, ssid, and >STEP-05
passphrase parameters as needed. Finally, edit /etc/ Add some code, HTML and CSS
dnsmasq.conf, ensuring that the IPaddresses are Clone the entire Flask folder from the project
consistent with your settings in repository onto your Pi. Flask is a small web
/etc/network/interfaces. Then reboot! framework written in Python which allows you to
create simple web services; in this case, its a webpage
>STEP-03 that allows us to see data from the Enviro pHAT
Add the Enviro pHAT and the latest captured images. We can also switch
You have the option of soldering this board directly between recording modes (movie or continuous still
onto the Pis GPIO pins, or you can use the supplied frames) or take photos on demand. This control of the
female header if you want to reuse it in other projects. camera is achieved via the excellent Python picamera
After that, install the Python library and dependencies library. You could enhance the project by adding
using the following command: additional exposure and shutter speed controls to
your interface if you want.
curl -sS https://get.pimoroni.com/envirophat | bash
>STEP-06
The library comes with some example programs Set the code to run at boot
and you should run these to test that everything To set the AquaPiCam program to run when the
is working correctly. Pi boots up, add this line to your /etc/rc.local file,
immediately above the exit 0 line:
>STEP-04
Fit everything into your container python3 /home/pi/Flask/apc.py &
To cut down on reflections and get the best possible
images, the camera should be as close to the Its also a good idea to configure the Pi to only boot
transparent side of your container as possible. The to the command line, using:
ZeroView from the Pi Hut is a clever mounting plate
that uses suction cups and will also hold your Pi sudo raspi-config
securely. Alternatively, you could make a mount
out ofcardboard and glue this to the inside of the and selecting console under option 3.
container. Velcro tape can be a good solution for Now go and find somewhere wet! You might
power sources (which normally need to be removable want to run a few tests in the bath before venturing
for recharging). further afield!
Youll
Need PROGRAMMABLE
> Camera Module
MOTION TIME-LAPSE
CAMERA RIG
> Arduino Uno
magpi.
cc/2gTVB0Z
>STEP-04
Mount the Pi camera
Mount the Camera Module onto the pan-and-tilt
mechanism. We have found that a longer camera
connector cable works better and prevents the camera
getting stuck. Connect the other end of the camera
connector to the Raspberry Pi, with the printed side of
the ribbon cable pointing towards the USB ports.
DOWNLOAD:
magpi.cc/2baa9cq
>STEP-05
Connect the Nokia 5510 screen (optional)
This optional LCD display allows you to see how
manypictures have been taken. There are two
versions of this display, so we advise you to check
the pin layout and adjust as necessary. Excellent
documentation and links to the Python libraries can
be found in this PDF guide: magpi.cc/2bkPU8g.
GO, PIONEER
DIY PORTABLE ACTION CAM
Build your own battery-powered, slow-motion, 90fps action camera
Youll to prove youve been there and done that!
Need ost adventurers who are thinking about recording >STEP-01
> Raspberry Pi
Camera Module
M an action event would choose to explore the
GoPro camera system. While being a very capable
Print it
Borrowing a page from the Astro Pi design book,
> 7 5mm recording device thats housed inside a diminutive piOneer consists of a three-part 3D-printed case that
(T-1 3/4) LEDs package, the GoPro cameras have an exorbitant price holds a Raspberry Pi, Camera Module, user interface,
> 7 430 resistors tag that stops weekend warriors in their tracks. What if LiPo battery, and large capacity micro SD card. The
> Big SPST switch an action camera cost less than $50? What if you could case consists of three separate STL files that can be
magpi.cc/ build this camera yourself? What if this camera had printed on any 3D printer with a 150150mm build
2bY3Pmn a fully functional Linux computer inside? Although it surface. The cases top piece should be printed with
> 3.7V 1000mAh might sound like pie-in-the-sky dreaming, these are the a removable support structure. You can download the
LiPo battery hallmarks for our piOneer slo-mo action camera project. STL files from here: magpi.cc/2c3XdUE.
magpi.cc/
2bY3Kiq
> 4 2-inch
#6-32 screws
> 4 - or
-inch rubber
grommets
A custom-designed,
3D-printed, high-impact
plastic enclosure
>STEP-03
Solder your UI Everything soldered
in place. Resistors
Were going to use a little bit of wiring trickery are attached to LED
here! Rather than routing each LED cathode to a anodes, whereas all
of the LED cathodes
separate Pi GPIO GND pin, were going to connect are soldered
each cathode together in a daisy chain fashion, together and wired
to a Pi GND GPIO pin
thereby using only one GND pin for six LEDs! Begin
this wizardry by gently bending the finished
LED cathode so that its touching the recording connection. Likewise, for the remaining LEDs, bend
LED cathode. Now solder these two cathodes and solder each LED cathode to the next until you
together. Continue up the daisy chain, carefully reach the Ready LED. Stop at this LED. Do not solder
bending the recording cathode until its touching the power (PWR) cathode to this chain: it must be
the countdown1 cathode, and soldering that connected to its own GND pin.
>STEP-04
Wiring your UI
The resistors are each individually soldered
to the anodes of all LEDs. Begin this process
by carefully wrapping one end of a resistor lead
around an LED anode lead. The resistor should be
parallel to the inside of the top case. Solder this
connection, and trim and discard the leftover resistor
lead. Add the six remaining resistors to the final
LEDs. Solder a jumper wire to the free end of the
resistors other lead. Complete the LEDs cathode
wiring by soldering a female jumper wire to the
power (PWR) LED cathode lead, and one final female
jumper wire should be soldered to the daisy-chained
cathodes that we created in step 03. The piOneer UI is
now complete.
>STEP-05
Adding battery power
The power system for piOneer consists of three
sub-assemblies: the power (PWR) LED, the SPST
switch, and the battery. While the LED and switch
are pretty straightforward fixtures in a do-it-
yourself (DIY) project, the battery has one additional
component that enables the Pi to run without being
Mount the camera
module to the tethered to a power outlet. A 5V step-up converter
3D-printed base
takes the output from the 3.7V LiPo battery and
with M2 fasteners
increases it to 5 volts.
>STEP-06 >STEP-08
Wiring your battery Connecting to the GPIO
Two wires are individually soldered to the switchs Place the wired-up top case next to the base that holds
terminals. One of the switchs wires is soldered to the Pi. Slip the mid case onto the top case. Connect
the positive terminal of the JST connector. The JST each of the female jumper wires from the top case to
connector is keyed for proper power signal orientation. the Pi GPIO pins by following this listing:
Use the battery for identifying which terminal is which
remember, the batterys red wire is positive, while GPIO JUMPER
the black wire is GND. The other wire from the switch is
connected to the IN pad on the 5V step-up converter. A Pin Wire
female jumper wire is connected to the OUT pad of the 1 PWR LED anode
converter. The final pad on the converter is a common 4 5V step-up converter OUT
GND connection. In other words, both the batterys GND 6 5V step-up converter GND
and the Pis GND must be connected together via this 9 PWR LED cathode
pad. Therefore, solder a wire from the GND terminal of 22 Ready LED anode
the JST connector to the 5V step-up converter GND pad 16 Countdown 3 LED anode
and solder a female jumper wire to this pad. All of the 15 Countdown 2 LED anode
soldering is now finished for piOneer. 32 Countdown 1 LED anode
33 Rec LED anode
>STEP-07 37 Finis LED anode
Begin final assembly
39 Daisy-chain LED cathodes
The Raspberry Pi and Camera Module will be fastened
(see step 03)
to the base portion of the case. Note the orientation
of the two openings in the base. These openings will
hold the Camera Modules lens and status LED. Line >STEP-09
the module up with these openings and use four Program the Pi
M2 screws for attaching the Camera Module to the Carefully and thoroughly examine each and every
base. Lay a rubber grommet on each of the four tall solder joint and wiring connection, looking for
mounting posts, set the Pi on top of the grommets, touching wires, solder blobs, connection mistakes,
route the Camera Modules ribbon cable out and and so on. Fix any problems before connecting your
over the GPIO pins, and use four more M2 screws for Pi to a power source! When your piOneer passes
securing the Pi to the base. These rubber grommets muster, connect the Pi to a monitor, keyboard, mouse,
will provide a small amount of cushion for the Pi and USB power source; now set up your Pi so that
during your upcoming rough-and-tumble adventures. it boots, with automatic login, to a command-line
Insert the Camera Modules ribbon cable into the interface (CLI). These settings will enable piOneer to
Camera interface connector on the Pi. run automatically without user input every time you
pioneer.py Language
>PYTHON
import RPi.GPIO as GPIO
from time import sleep DOWNLOAD:
import datetime as dt magpi.cc/2coG1um
import picamera
GPIO.setmode(GPIO.BOARD)
# Set up LED pins
# Ready LED
GPIO.setup(22, GPIO.OUT)
# Countdown 3 LED
GPIO.setup(16, GPIO.OUT)
# Countdown 2 LED
GPIO.setup(15, GPIO.OUT)
# Countdown 1 LED
GPIO.setup(32, GPIO.OUT)
Use-inch or # RECord LED
-inch rubber
grommets as tiny GPIO.setup(33, GPIO.OUT)
shock-absorbing # finisH LED
spacers between
GPIO.setup(37, GPIO.OUT)
the Pi and the case
PI-THERMOMETER
Connect your Pi to existing web platforms and easily build
Youll your own internet-based thermometer out of LEDs
Need ow often do you check your browser or Raspberry Pi. Once you have an SD card with the extra
> Wyliodrin STUDIO
goo.gl/Sgj9HB
H smartphone to see how cold it is outside?
Nowadays, we read the temperature using
service installed, you need to connect the Pi to the
internet, in the same network as your computer. As
> 3 Green LEDs applications that take data from the internet and soon as the board has booted, you will see it available
display them in a nice interface. This reduces under Port. Press Connect and youre ready to go.
> 5 Yellow LEDs
the interactivity and simplicity that old mercury
> 2 Red LEDs
thermometers had, while offering the great flexibility >STEP-02
> 10 220-ohm of reading the temperature anywhere on the globe. Create a new visual application
resistors
But what if you could have the best of both worlds? In order to create the thermometer, press the
> Breadboard and You can put your Raspberry Pi to use and replace the projects button and create a new application.
jumper wires
computer with a thermometer-like device, which Name it pithermometer and select visual for
has the capability of displaying the temperature at the programming language. Open the newly created
whichever location you wish. app and youll see the frame in which you need to
connect the visual elements. The blocks gallery is on
>STEP-01 the left. We have chosen this way of programming
Set up the Raspberry Pi because it allows you to rapidly create the code, and it
Wyliodrin STUDIO is an IDE (integrated development doesnt require you to know any specific programming
environment) that makes it very easy to create language. In addition, if youre familiar with Python,
complex applications for your Pi. First of all, you you can press the Show code button and see how
need to download it (goo.gl/Sgj9HB) and follow the the code gets generated as you drag and drop the
first two steps of the Getting Started tutorial for the visualelements.
>STEP-04
Weather API
The website openweathermap.org offers a complex
API that allows you to get weather details from cities
around the world. To access the API, you need to sign
up for a key at openweathermap.org/appid. You only
need to provide your email and choose a password.
Once you have created an account, you can use the API If you would like to see the Python code that will
key available at home.openweathermap.org. get executed once you run the project, you can select
Show code.
>STEP-05
Writing the application >STEP-06
The application reads the weather from the city of your Check the thermometer
choice and maps the value to the number of LEDs. The All thats left to do is to run the application. As long as
string used within the Init weather API block is the you dont stop it, the device will read the temperature
key you got in the previous step. from the internet every 30 minutes and update
In order to do the mapping, we specified the average accordingly. You could add more LEDs to make it
minimum and maximum temperature values according suitable for a larger range of temperature values. We
to the current time of the year. Its recommended that suggest you also put the device in a box so that it looks
you use a reduced range, to make the differences in just like a thermometer. Now youll know how warm it
temperature visible on the thermometer. is outside with just a turn of your head.
Left The
thermometer
displaying a
temperature
of 15Celsius
RGB LED
coderdojoham.org
TWEET-O-METER Use the GPIO Zero Python library to control an RGB LED
Youll and see how well your tweets are doing
Need eeping up to date with Twitter can be very There are two libraries that make our project really
> RGB LED K time-consuming, especially if there are lots of
tweets. What if you could see at a glance what
easy. Twython allows you to contact Twitter using
Python and collect tweets (youll need to register for a
> Breadboard
the Twittersphere thinks about a certain topic? In this Python developer account see step 5). Then, to read
> Jumper wires
tutorial were going to build a simple RGB LED circuit, the tweets in the code, were going to use TextBlob;
> 3 100 ohm and program it to change colour to indicate whether there are other libraries available, but this is one of
resistors
the tweets that include a given hashtag or keyword are the simplest.
> Twitter developer using positive, negative or generally neutral language.
account
>STEP-02
> TextBlob Python
library
>STEP-01 Do you like sausages?
Install Python libraries Lets take a look at a simple example. Open a Python3
> Twython Python Update your Pi to the latest version of Raspbian and interpreter (either use the command line or IDLE)
library
download and install the additional software youll need. and type:
sudo pip3 install twython textblob >>> from textblob import TextBlob
>>> sentence = TextBlob('I really like
sausages, they are great')
>>> sentence.sentiment.polarity
Common cathode RGB The resistors limit the current flowing
LED. The longest leg will through the LED and prevent damage 0.5
be the cathode and should
be connected to ground
Any value for polarity greater than 1 indicates a
positive sentiment (like); a value less than 1 suggests
negative sentiment (dislike). Try changing the
sentence and see how a different phrase will give a
different result. Results will be more accurate if you
have more text, although a 140-character tweet is
normally good enough.
>STEP-03
Select your RGB LED
Light-emitting diodes (LEDs) are cool. Literally.
Unlike a normal incandescent bulb which has a hot
filament, LEDs produce light solely by the movement
of electrons in a semiconductor material. An RGB
LED has three single-colour LEDs combined in
one package. By varying the brightness of each
component, you can produce a range of colours,
You can use any size just like mixing paint. There are two main types of
breadboard for this circuit
RGB LEDs: common anode and common cathode.
Were going to use common cathode.
tweetometer.py Language
>PYTHON
#Tweet-o-meter: Add your own Twitter API developer
keys (lines 9-12) DOWNLOAD:
# and choose your own keyword/hashtag (line 56) magpi.cc/1WBerda
import time, sys
from textblob import TextBlob
from gpiozero import RGBLED
from twython import TwythonStreamer
>STEP-06 print(totals)
print('winning: ' + overall_sentiment)
Process some tweets time.sleep(0.5) # Throttling
Download or type up the code from the
tweetometer.py listing. Add the Twitter API keys def on_error(self, status_code, data): # Catch and display Twython errors
and tokens generated in step 5 at the appropriate print( "Error: " )
places. Now pick a hashtag or keyword for testing. print( status_code)
The internet loves cats and dogs, and likes to argue status_led.blink(on_time=0.5,off_time=0.5, on_color=(1,1,0),n=3)
about which is better, so we found that using cat
# Start processing the stream
or dog generated more than enough data! Run the
stream2 = MyStreamer(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
code: you should see a running count of the analysed
while True: # Endless loop: personalise to suit your own purposes
tweets on the console, and the LED should flash with
try:
each new matching tweet. Between new tweets, the stream2.statuses.filter(track='magpi') # <- CHANGE THIS KEYWORD!
LED will remain the colour of the sentiment with except KeyboardInterrupt: # Exit on Ctrl-C
the biggest count. sys.exit()
except: # Ignore other errors and keep going
raspberrypi.org/magpi continue
The Official Raspberry Pi Projects Book 133
133
Tutorial STEP BY STEP
BRAM DRIESEN
A Drupal developer for Capgemini,
These wires with he loves to bake projects
bullet connectors with Raspberry Pis and fly
go to the tower light with multicopters.
twitter.com/BramDriesen
Youll
Need CREATE A
> IRLB8721
MOSFETs
JENKINS BUILD
STATUS LIGHT
> 220-ohm resistors
> 12V DC
tower light
magpi.cc/
1rGNbwB
> Micro-USB to
I your Jenkins projects to anyone in the same
room without the hassle of logging in to
Ethernet adaptor
the dashboard. With some LEDs, a few other cheap
> Miscellaneous components, and some soldering skills, you can
other parts
complete this project. You can take it to the next level,
however, by using an industrial tower light instead
of regular LEDs. Employing an existing API, you can
retrieve almost any data from Jenkins and get a nice
visual indicator of the status of your project.
>STEP-01
Make a HAT
First, we need to create the HAT. We used a Perma-
Right Using some
neodymium Proto board from Adafruit, but you can also use a
magnets, you can
breadboard if you dont want a permanent solution.
mount the tower to
any metal object, In this version, the following GPIO pins were used,
such as a closet or
since they best fit the layout:
fridge door
>STEP-02
The Python Jenkins-API
You need to start off with a clean Raspbian Jessie
image (not the Lite version) and a Raspberry Pi Zero
(make sure to solder the GPIO header pins!). After you
have burned the image and completed the basic setup,
make sure to set up an internet connection. You can
either use a standard WiFi dongle or a microUSB to
Ethernet adaptor. Once you are ready, proceed with
the installation of the Jenkins API. In the terminal
window, enter the following command:
Language
>STEP-03 Default-config.py >PYTHON
Create the Python script
Most of the coding work has already been done for # Default configuration file for Jenkins DOWNLOAD:
magpi.cc/1rGOsnx
you and is available on GitHub. To get everything you # Copy this file and name it config.py
need for this project, clone the project from GitHub on jenkinsurl = "http://example-url.com:8080"
your Raspberry Pi by using the following command in username = "your-username"
yourterminal: password = "your-password"
jobs = ['job-name-1', 'job-name-2']
git clone https://github.com/BramDriesen/ gpios = {
rpi-jenkins-tower-light.git 'red': 18,
'buzzer': 23,
Make sure to clone the project in a directory where you 'yellow': 24,
can easily find it afterwards, such as the home directory. 'green': 27,
You can use cd <folder>/<name> and cd ../ }
commands to navigate through folders in your terminal.
You can also download a ZIP file of the source code from
the versions page: magpi.cc/1rGOjAt. >STEP-05
Auto-run on boot
>STEP-04 Since were working on a permanent solution, we
Configure the code want to ensure that our script launches immediately
Now we have cloned the project, well browse into on boot. We can edit our rc.local file to launch the
the directory to configure the Python script. Copy the script when the Raspberry Pi is booted up. Edit your
default configuration file default-config.py and rename rc.local file with sudo nano/etc/rc.local and add
it to config.py. You can use the command cp default- the following line to direct the script to auto-start
config.py config.py to do this all in one go. After upon boot:
you have copied the file, edit it with your favorite text
editor; we like to use nano, so in this case wed issue the python /path/to/the/script/rpi-jenkins-
command nano settings.py. Now change the default tower-light/jenkinslight.py &
configuration lines so it contains your credentials,
job name(s), and correct GPIO pins according to your Reboot your Pi and you should be good to go! For
situation. If you have only one job, make sure the jobs maintenance, you can always SSH into the Raspberry
parameter remains an array with one item inside. Pi in the future.
5V
A B C D E F G H I J
1 1
Ground
DSI (DISPLAY)
Power
Raspberry Pi 2014
Raspberry Pi Model B+ V1.2
GPIO
http://www.raspberrypi.org
5 5
Data
10 10
HDMI
15 15
CSI (CAMERA)
Audio
20 20
25 25
ETHERNET
USB 2x USB 2x
30 30
A simple push
A B button
C D E can
F G be
H I hidden
J in a pocket The lights are attached behind black chiffon to slightly
to activate the colour changes in the ring obscure them, and allow the cosplayers face to remain
hidden while still being able to see
Youll
Need MAKE NEOPIXEL
> First-generation
Raspberry Pi
(A+, B+, Zero, etc.)
COSPLAY EYES WITH PI
> NeoPixel ring Create your own powerful eyes for Sans from Undertale, by getting some
> 4 AA battery
pack, preferably LEDs and a NeoPixel ring. Itll be a skele-ton of fun!
with a switch
eoPixels are amazing, addressable RGB LEDs sudo apt-get install build-essential
N
> 4 rechargeable
AA batteries from Adafruit. You can get them in strips, python-dev git scons swig
> Portable rings or individually, and create incredible
mobile phone effects with them. However, its not always clear how Now download the library for the NeoPixels:
powerbank
to control them on the Raspberry Pi.
> Push button Recently, friend of the mag Mel Nurdin (of Freyarule git clone https://github.com/jgarff/
> Various wires Cosplay: magpi.cc/2iq00fE) expressed an interest in rpi_ws281x.git
and resistors using NeoPixels in a cosplay of theirs. We decided to cd rpi_ws281x
cut through the information and create a Pi-powered scons
pair of eyes for their costume: skeleton pun-maker
and hotdog salesman Sans from the excellent Undertale Finally, we can install the module to the Pi:
game. Follow along to make your own Megalovania
eyes, or learn how to use NeoPixels in general for your cd python
own projects. sudo python setup.py install
>STEP-01
Prepare your Pi >STEP-02
A Raspberry Pi Zero was used in the final build, so it Wire up the NeoPixel
would fit better within the confines of the costume. Its worth testing this out on a breadboard first, so you
Update a version of Raspbian Jessie by going into the can understand the concept of the circuit. Basically,
terminal and using sudo apt-get update then sudo the NeoPixel needs to be powered separately by the
apt-get upgrade, before installing the software four AA batteries, with a data cable coming from
needed for the NeoPixels: a PWM-enabled pin on the Pi to control the LEDs.
You dont need to step up the 3V3 signal from the Pi to make them turn blue, and another button press will
do this, so to keep it simple, were not. The main thing make the LEDs flash blue and yellow quite quickly,
to remember is that the ground of the NeoPixel needs emulating a specific scenario in the game Undertale.
to be connected to the negative on the battery pack Add this command to the end of the file /etc/profile
and a ground on the Raspberry Pi. Weve connected so it will run on boot.
the data pin for the NeoPixel to pin 6 (GPIO 18).
>STEP-05
>STEP-03 How the code works
Wire up the button Each NeoPixel in a series can be addressed individually.
The button is the easy one to wire up. It doesnt As the code only needs to have all the lights the same
matter which way around it goes, but we have it colour at one time, weve created a for loop in the main
connected to pin 40 right at the end and to ground on function that goes through and sets each LED to the
pin 34, to keep it away from the NeoPixel wires. Youll same colour one by one. Weve also told the code how
also need a resistor suitable for your button ours many LEDs there are, where theyre connected, and
uses a 470 ohm resistor and it can be connected to what frequency to use for refreshing them. The rest of
either side of the button. This is controlled by GPIO the code is fairly straightforward, waiting for button
Zero, so its addressed at GPIO 21 in the code. presses and using delays to manage them.
>STEP-04 >STEP-06
Add the code Finishing up
Type up or download the code to the Raspberry Pi. Thats the pure circuit, but how is it used in the
You can either put it in the home folder or in its own costume? Mel installed a ring of frosted acrylic into the
folder; either way, you can test it by running it in the skull she made and stuck the NeoPixel ring behind it:
terminal with: this served to diffuse the individual lights into a more
coherent ring. Normal white LEDs were mounted in
sudo python eyes.py both eye sockets and controlled by a separate switch
for the normal eyes. The button from the Pi was on a
It should light up the LEDs white for a couple of long enough cable that it fit sneakily into her pocket
seconds before turning them off. A button press will useful, as the character keeps his hands in them!
Youll
Need WRITE TEXT
> USB 5V voltage
booster step-up
module
IN THIN AIR
WITH A PI ZERO
magpi.cc/
1U5Fz0p
15
Going for a spin
16 We provide the demo code PiZeroPOV.py on GitHub
(magpi.cc/1WD4ADE), which will display the contents
18 of pov.txt. The script will check the contents of the
text file every 10 seconds and display them on the
22
POV. As the Pi Zero is connected to your network via
7 its wireless adapter, you can change whats being
displayed at any time without needing to shut down
or alter the spinning system in any way. The only
limitations of this demo script are that it only accepts
lower-case characters and spaces anything else
will break it miserably, but, hey, anybody can easily
improve it with a bit of time and dedication.
So, as you log into your rotating Pi Zero, just type:
CONTAIN THE VIBRATIONS
Language
sudo python PiZeroPOV/PiZeroPOV.py &
Even the cable connected to the LED bar will introduce
substantial imbalance if not properly anchored. Pull all
...and start editing pov.txt by using nano: >PYTHON
the slack of the cable to the centre of the CD and fix it
tightly so that it wont move once the disc is spinning. You
might want to experiment, drilling a few holes to find the nano PiZeroPOV/pox.txt DOWNLOAD:
sweet spot for where to place the LED bar, but after a bit magpi.cc/1WD4ADE
of trial and error you should have a stable enough setup.
This will get your messages in the air!
MAKE A
lives of a billion people.
lucyrogers.com
DINOSAUR REACT
TO YOUR EMAIL Hack a toy dinosaur with Node-RED to provide email notifications
Youll >STEP-01
Need
ant to let the kids know its time for dinner by
W waking a toy in their bedroom? Or have a fun
alert on your desk when you receive an email?
Install Node-RED on your Pi
Before connecting anything to the GPIO pins of your
> Connex Action This project takes you step by step through the process Pi, well draw the code. If you have the latest version
Dinosaur
Electronics of hacking a cheap toy and using a Raspberry Pi, Node- of Raspbian Jessie, Node-RED comes installed in your
Kit: magpi.cc/ RED drag-and-drop visual programming, and simple Programming folder. If not, you can install it via a
1ScJbZX electronics to make a dinosaur move on demand. The terminal (see magpi.cc/28PJz2O). You also need the
> LED & 1k and electronic circuit used in this project can also be used Firefox browser. Connect your Pi to the internet, open
330 resistors to control larger motors, relays, or high power LEDs. Node-RED (Menu>Programming>Node-RED), and
> NPN Darlington First step, toy dinosaurs next step, email control of paste the address at the top of the Node-RED window
pair transistor
all your home automation devices? into Firefox. This address should be something like
> Diode 1N4001 http://192.168.X.XXX :1880. You should now see
> Breadboard the Node-RED flow page. If you find everything is
A Darlington pair transistor
and cables allows higher currents to sluggish, you may like to access that address from
be switched compared another computers browser.
to a normal transistor
>STEP-02
Intro to Node-RED
If you havent used Node-RED before, start by making
an inject-debug flow. Drag an inject node from the
Input section of the left menu into the middle pane.
Its name should change to timestamp. Repeat with a
green debug node from the Output menu. Join the two
by clicking one of the grey pimples and drag it to the
pimple on the other node. Click the big red deploy
button at the top-left. Activate the inject node by
clicking the square to the left of the word timestamp.
The resulting message (payload) appears in the
debug tab.
>STEP-03
Draw the flow
This is where Drag the email node with the connector on the right
you put the into the work area. Double-click it and enter your
dinosaur motor!
email credentials. Connect a debug to the email node,
This diode to check what messages are arriving. The message
stops back EMF contains the email text and who its from. Drag in a
damaging the Pi
switch node and double-click to make some changes.
For Rule1, change the == to Contains and type
Language
Set your dinosaur
free! There are
already a few
dinos in the >NODE-RED
wild tamed
by @andysc,
@neilcford, DOWNLOAD:
@fortoffee and magpi.cc/1sNeypk
@andypiper
Left This
Node-RED flow will
trigger if any email
is received. The
delay node stops
the dino after
five seconds
PYTHON
If you want to
do this using
Python, see @
ForToffees blog
(magpi.cc/
1sNeTZj) or
Chris Robbins
(magpi.cc/
1sNeMNi).
BUILD A WEIGHT-TRACKING
WISECRACKING SCALE
Connect a set of scales to the web that tracks your weight
Youll and sends you text message updates with an attitude
Need h, that boring, soulless bathroom scale. Setting up the Wii Balance Board
> Wii Balance
Board
O We love to hate you when you dont show
us that number we want. We swear at you,
As the Raspberry Pi 3 comes with Bluetooth built
in, it makes it very easy to communicate with the
> Wii Fit as if youd care. Why hasnt anyone made a scale Wii Balance Board. If you have a Raspberry Pi 1
rechargeable thats actually fun to use? Its time to create a scale or2, youllneed to use a USB adapter such as an
battery pack
thats not only smart, but has a bit more personality inexpensive USB Bluetooth 4.0 Low Energy adapter
> Felt pads to brighten your day. Were going to build our very (magpi.cc/2ioms8V).
> Pencil own hackable, weight-tracking, text-messaging Power on your Pi and open up a terminal window.
bathroom scale that comes with a built-in sense You can see the address of your Bluetooth dongle by
of humour. entering the following command:
hcitool dev
Right The Wii Install the Bluetooth modules that we will be using
Balance Board
in our Python scripts:
pairs with your Pi
through Bluetooth,
making it easy to
read your weight
sudo apt-get install python-bluetooth
with a script
After installation completes, were ready to connect successful, youll see something similar to the
and communicate with the Wii Balance Board. We following on rhe screen: INITIAL
wont be permanently pairing our Board with our Pi, STATE
like we do with most of our Bluetooth devices. The Wii Found Wiiboard at address Initial State is
Balance Board was never intended to be paired with 00:23:CC:2E:E1:44 an easy-to-
anything other than a Wii. Pairing will happen every Trying to connect... use platform
for collecting
time we run our Python script. Connected to Wiiboard at address data from
Its time to connect our Wii Balance Board to our 00:23:CC:2E:E1:44 connected
Raspberry Pi. Well do this by running a Python script. Wiiboard connected devices and
turning that
To get the scripts well use for this project, clone the ACK to data write received data into
GitHub repo: 84.9185297 lbs dashboards,
84.8826412 lbs waveforms,
notifications,
cd ~ 84.9275927 lbs and more.
git clone https://github.com/InitialState/ initialstate.com
smart-scale.git You have now successfully converted your Wii
cd smart-scale Balance Board into a Raspberry Pi-connected scale.
ls Now, lets make it a cool scale.
You should see two Python files in the new Create a hacky lever to access the sync
smart-scale directory: smartscale.py and button on the bottom of the Board,
using a pencil and a few felt pads
wiiboard_test.py. Run the wiiboard_test.py script
to test communication and take weight readings
from the Wii Balance Board:
Discovering board...
Press the red sync button on the board now
Initial State
We want to stream our weight/data to a cloud service
and have that service turn our data into a nice
dashboard that we can access from our laptop or
mobile device. Our data needs a destination; well use
Initial State as that destination.
Go to magpi.cc/1TFlhaz and create a new account,
then install the Initial State Python module onto your Pi:
cd ~
\curl -sSL https://get.initialstate.com/
python -o - | sudo bash
Right Receive a
variety of funny,
inspiring, and
insulting SMS
messages from
your smart scale
made for the Wii Balance Board that we can use a data stream
to your Initial
Stateaccount
Youll
Need TERRAFORMING
MINECRAFT
> Initial State
account
initialstate.com
Language
>PYTHON
DOWNLOAD:
magpi.cc/234A3hY
>STEP-03 have registered for an account, click on the create Above You can
create some very
Tune the code HTTPS bucket button (the plus symbol) and give it a strange-looking
Terraforming can take a long time were talking suitable name. Then check Configure Endpoint Keys worlds, like
this one where
days rather than minutes. However, we can tune our and copy the Bucket Key and Access Key into your everything on the
code to speed things up. Explore your world and find version of the code. surface is made
of glass
the tallest mountain range and deepest valley. Make
a note of the height (the third value displayed in the >STEP-06
top-left corner of the screen). You can then plug Start terraforming!
these values into the code. If youre using a free account, edit the code and set the
We have set the default terraforming height Free_account variable to True. This will throttle the
range from -3 to 35 on the y axis, but you can make amount of data sent to Initial State and allow you to
this bigger (this will take longer) or shorter (this record the whole process without exceeding the data cap.
will take less time), depending on the size of the Start your code running and check the console for
Below Initial
geological features in your world. any errors. You can fly to the corner of your world and State has a range
of graph types
should soon be able to see the changes taking place.
>STEP-04 Once the first data reaches Initial State, you can create
to make your
terraforming data
look informative
Set the speed for the power of your Pi a cool dashboard: use the Tiles interface and play
and cool at the
This code should work on any type of Pi, but older, less around with the different types available. same time
powerful models may struggle if you terraform at full
speed. If Minecraft cant keep up with all the changes
its being asked to make to the landscape, it may hang.
Therefore, its a good idea to pause after a certain
number of blocks, to allow Minecraft to catch up. On
a Pi 3, you can comfortably transform 500+ blocks
before the need for a pause, but for a Model B you may
need to deal with 50 blocks at a time. Youll probably
want to run a few experiments to find the optimum
configuration for your setup.
>STEP-05
Register for an Initial State account
Initial State allows you to upload live data and plot
interesting charts and graphs. A free account lets
you stream 25,000 events a month and examine the
last 24 hours worth of data in any bucket. Once you
CAPONG
paddles on screen
Youll
Need
> Pi Cap and
Electric Paint
A PONG GAME
magpi.cc/
2e8kmGK
> Acrylic
> Glue Make a physical version of Pong! Use capacitive sensing and Electric Paint
> Cardboard to make a fun and addictive two-player game to play with your friends
> Aluminium foil
apong breaks Pong out of the screen and Once youve done this, download and install
C into your hands. Map the Pong paddles to
the position of your hands, using a Pi Cap
Processing if thats not already on your laptop. Unzip
and install the code mpr121_pong in Processings
and Raspberry Pi, to create a simple and addictive sketch folder, usually /Documents/Processing.Open
game. Capong is a physical reinterpretation of the the sketch in Processing and start it running. To run
original video game. Instead of mouse or arrow keys, the OSC demo standalone, go to your PiCapExamples
it uses sensors arranged on a laser-cut stand so folder on the Pi and cd to cpp/picap-datastream-
that each player moves her hand between a pair of osc-cpp. Use ./run to see the Pi Cap datastream. Find
sensors. The game is based on SimplePong, available out the IP of your laptop then use ./run host [IP
on openprocessing.org and released under Creative address of laptop] to stream it to Processing. Pong
Commons. It was modified to use input from the Pi Cap should now be running. Click the laptop mouse to
sensors and converted to two-player operation. start a game; it finishes when a player misses the ball.
Click the laptop mouse to start another game.
CROCODILE First steps If you want to build the acrylic stand, as seen in our
CLIPS First, we need to set up the Pi Cap. Run through the version, you can download the Illustrator filesonline
Setting up your Pi Cap on the Raspberry Pi Zero (here: magpi.cc/2enaB7V and here: magpi.cc/2enc6Tn)
Makesure you tutorial found at magpi.cc/2emLB1K, and dont miss and follow the tutorial instructions, courtesyof
leave enough
length for each any steps. (You need to know the IP of the Pi to log @rossatkin. You will need a laser cutter to cut these out,
crocodile clip into it.) Run through the Pi Cap intro to see the code or you can make it out of foam board.
to reach its examples, particularly the one that streams the sensor To assemble your stand, glue one of the I-shaped
designated
electrode. data via OSC to your laptop terminal window. Notice pieces of acrylictothewhite rectangular piece with
the DIFF data; thats what well be using. no holes in it.
mpr121_pong.pde
01. import oscP5.*;
02. import netP5.*;
03.
04. final int numElectrodes = 12;
05.
06. boolean serialSelected = false;
07. boolean oscSelected = false;
08. boolean firstRead = true;
09. boolean soloMode = false;
10.
11. boolean gameStart = false; //true;
12.
13. float x = 150;
14. float y = 150;
15. float speedX = random(3, 5);
16. float speedY = random(3, 5);
17. int leftColor = 128;
18. int rightColor = 128;
19. int diam;
20. int rectSize = 150;
21. float diamHit;
22. int vpos1 = 0;
23. int vpos2 = 0;
24.
25.
26. OscP5 oscP5;
27.
28. int[] diffs;
Above top Paint size of the interior surfaces. If youre using Electric 29.
Electric Paint to
make your sensor,
Paint, you canpaint directly onto these squares. 30. int globalGraphPtr = 0;
and to cold- Once dry, apply some double-sided tape; youre 31. int electrodeNumber = 0;
solder to your
crocodile clip
going to glue the sensors face down against the 32. int serialNumber = 4;
acrylic. But first, you must cold-solder the paint! 33. int lastMillis = 0;
Above Attach
each of the
Using your Electric Paint tube, squeeze out 34.
four crocodile agenerous amount of paint onto the exposed 35. void setup() {
clips from each
sensor to the
copper. You should make sure the wire is held 36. size(500, 500);
correctelectrode in place so that it doesnt move around; you can 37. noStroke();
use double-sided tape. When youre finished, 38. smooth();
you should have four sensors two square, two 39.
rectangular connectedto each of the sides of the 40. // setup OSC receiver on port 3000
Capong stand. 41. oscP5 = new OscP5(this, 3000);
If you dont have Electric Paint, you can 42.
make yoursensors using aluminium foil. Just 43. // other setup
follow the same steps as above, but sandwich 44. diffs = new int[numElectrodes];
the exposed wire between the aluminium foil 45. }
and the cardboard. 46.
TROUBLE- 47. void oscEvent(OscMessage oscMessage) {
You can now firmly attach your sensors to the
SHOOTING
stand and get out your Pi Cap and Pi Zero. Take the 48. println("oscevent");
Make sure crocodile clips that are protruding from the top of 49.
youve
the Capong stand and attach them to your Pi Caps 50. if (firstRead && oscMessage.
mapped
the correct electrodes. Make sure youre connecting to the 51. checkAddrPattern("/diff")) {
crocodile clip correct electrodes, the ones youve programmed firstRead = false;
to each sensor
for functionality. 52. }
and electrode
combination. Now you can connect your Pi Zero, upload the 53. else {
code, and get playing!
We used a 3A powered
USB hub to prevent
brownouts when
watching telly
The Pi 3 provides
enough juice to power
the TV tuner directly;
older Pis would struggle
Youll
Need
> USB TV tuner
linuxtv.org/wiki
> Powered
as well as stream video and audio
USB hub
ood Telly Season always seems to be just found here: magpi.cc/2dDMTS7. However, with this
magpi.cc/
2gUfp4n G around the corner, so what better time to make
a PVR that does everything? From recording
TV tuner taking up to 500mA, an old laptop hard disk
sucking 1A and the Pi itself consuming up to 800mA,
> OSMC
osmc.tv TV shows to streaming favourite films from your NAS we worried about brownouts if we powered everything
> MPEG2 codec
to playing tunes from your smartphone, a PiVR can do from the Pi. We therefore based our project around a
magpi.cc/ everything apart, that is, from virtual reality: the 3A powered USB hub: plenty of headroom.
2dDLT0c names a little misleading like that.
Better still, your PiVR only uses USB devices and OSMC and the software
requires a few fairly basic terminal commands to get We chose OSMC (osmc.tv) as the basis for the PiTV,
running. Theres nothing here to scare a Pi novice, and as it incorporates the popular Kodi front-end (albeit
plenty to please the experts. in skinned form) with a full Debian back-end.
The PiVR is based around a Pi 3, both for its Essentially, its easy to use and easy to modify and
processing power and the current it can feed to USB add to. Better yet, its a cinch to install: download the
devices. The TV tuner used in this project can be installer and itll set up your SD card automatically.
Next, mount the hard disk and link it to a folder Tvheadend on OSMC NEATER
called recordings: The easiest way to install the latest, correct version of
BUILD
Tvheadend is via OSMCs front-end. First, you must
sudo mkfs.ext4 /dev/sda -L storage navigate its awkward setup procedure; use only a Using a 314GB
WD PiDrive
sudo mkdir /mnt/recordings keyboard, as its too easy to get confused as to which
(which only
sudo mount /dev/sda /mnt/recordings level of menu or option youre selecting with a mouse. consumes
sudo chown osmc:osmc /mnt/recordings Once negotiated, head to My OSMC and track across 0.55A) might
allow you to
sudo chmod 777 /mnt/recordings to Remotes to set up your remote. Then track back to
drop the USB
the OSMC Store and install Tvheadend (its free, dont hub from
Now you can find your Pis serial number, which worry), not forgetting to select Apply to actually start the build.
is needed to buy an MPEG-2 codec licence for your the installation.
Pi (this licence will be tethered to your Pi). Without Once installed, youll need to switch to another
an MPEG-2 codec licence, the Pi will have to decode computer to set up Tvheadend; point a browser to
the TV signal in software rather than its bespoke http://<pi-ip-address>:9981 and log in with
hardware, which can lead to overheating and general osmc/osmc. Now follow this setup order to avoid
performance issues. Follow the instructions at getting into awful tangles with Tvheadend. First,
magpi.cc/2dDLT0c and pay the 2.40. Your head to Configuration > DVB Inputs > Networks.
licence code should arrive within 72 hours; add the Click Add and then choose DVB-T as the Type; on the AUDIO
entire line of the received MPEG-2 licence to your next screen give your network a relevant name and ADD-ON
config file: select the correct Predefined Mux for your TV area (see
OSMC
digitaluk.co.uk if youre not sure). If youre on the supports
sudo nano /boot/config.txt edge of two masts coverage, add a network for both. AirPlay (from
Now go to the TV adapters tab and select your TV iTunes servers)
while the Pi 3
Getting your TV tuner up and running might require tuner; on the right-hand pane, tick the Enabled box has Bluetooth
some detective work, but your first step is to find and add any and all networks via the Networks field. upgrade the
your tuner on magpi.cc/2dDNsLv. If youre lucky, Head to the Muxes tab and you should see many audio output
and youve got
your tuner wont require specific firmware, otherwise entries with a scan status of PEND; after a while, these a streaming
youll have to download it, typically from GitHub: see will switch to Active, and hopefully then to OK. The jukebox.
magpi.cc/2dDMI9h. However, our PCTV TripleStick last job in the Tvheadend webpage is to head to the
(292e) required even newer firmware, which we found Recording tab and change the recording location to
at magpi.cc/2dDMiQm: your hard disk, in our case mnt/recordings. Click Save
which is toward the top-left for this section.
wget http://palosaari.fi/linux/v4l-dvb/ Now you can switch back to OSMC on your Pi. Head
firmware/Si2168/Si2168-B40/4.0.25/dvb-demod- to Settings > Add-ons > My add ons > PVR clients >
si2168-b40-01.fw Tvheadend HTSP Client. Press Enter on your remote,
sudo mv dvb-demod-si2168-b40-01.fw /lib/firmware then select Configure. Enter the Tvheadend login SCREEN OUT
sudo reboot details (osmc/osmc) and then select Enable. Finally,
Add a VFD
dmesg head to Settings > TV > General and tick Enabled; you display for
should see OSMC update a few things. Head back to extra slickness,
The return from dmesg shouldnt list any errors the main OSMC menu and youll now see an option for perhaps using
a 10 ZeroSeg
regarding firmware not downloading. If so, you can Live TV. Open that, and youll see an EPG and other with the two
proceed to setting up Tvheadend, the server and such options. To watch a show, select it from the buttons left off
client combination that handles all the live TV duties EPG and then press Back on your remote until you go (magpi.cc/
2dOtGBg).
for the PiVR. beyond the main menu into full-screen live TV.
Youll
Need TURN YOUR PI
> microSD card
raspi-config
Kickstart me up
To run Amiga programs, youll need a Kickstart ROM
firmware from the original computers. UAE4ARM
comes with the open-source AROS ROM, which can
run only some Amiga programs, so we recommend
using genuine Amiga Kickstarts for reliability.
Once youve set up your
The Amigas Kickstart ROMs and Workbench GUI
emulated hardware
Game controllers, and firmware config, are still being maintained, thanks to Italian firm
mouse, and keyboard just mount a floppy disk
You can load and create configurations can Cloanto. Amiga Forever Plus Edition, priced at 29.95,
image and click Start
emulated hardware be selected and gets you a complete, legal set of Kickstarts for every
configurations for specific tweaked in Input
Amiga computers Amiga computer and console. Cloanto is still working
PUBLISHER-APPROVED
GAME DOWNLOADS
Ami Sector One
magpi.cc/2dDLElL
Dream17
dream17.info
Games Coffer
gamescoffer.co.uk
MOON MOONPI
CODEThe computers on the Apollo spacecraft
needed programming as well
From space to your Raspberry Pi
The code for the moon landings is an amazing piece
of history, but what does that have to do with the
Raspberry Pi? A couple of years ago, the AGC code
was ported to various versions of the operating
system Linux to create a virtual AGC that people
ouve probably heard someone say before how could use and learn from. Its not a simulator in any
Y modern pocket calculators are more powerful
than the Apollo spacecraft; theyre mostly
sense of the word, but it can give you an idea of how
working the computers in space might have gone.
correct, although its tricky to properly compare. The Raspbian, the main Raspberry Pi operating
Apollo Guidance Computer (AGC) was created for the system, is a version of the OS called Debian that has
Apollo program, which featured a 1.024MHz clock been tweaked to work on the Pi. Debian itself is a
speed, 16-bit word length, and 2,048 words of RAM. popular distribution of Linux and the virtual AGC
Not bits or bytes, words. worked on normal Debian, so getting it working
As primitive as it may seem 50 years later, it was on Raspberry Pi is quite simple! Over the next few
powerful enough for the task. Of course, the computer pages well teach you how to get it working on the
needed more than power and thats where the code computer powering the Astro Pis currently up in
comes in. Programmed during the 1960s, the project space, in homage to the Pis moon-landing ancestor.
was fundamental in creating what we know of today as
software engineering.
The code is written in assembly, which is a much
lower-level programming language to something
like Python, but was much more common in the
Sixties, when programming computers was a fairly
new concept.
It was a marvel for its time. Now, as with all of
NASAs work, its open to the public. While you
may have been able to access it in some way for a
few years now, the Apollo 11 version of the code is
now up on GitHub. Modern-day code collaboration
software being used to house and distribute the code
The AGC computer and its control pad.
All images
that got humans to the moon an incredible time
Computers were very different in the Sixties,
courtesy of NASA for computer science. relying mostly on magnetic ribbon for storage
SET UP YOUR
THIS VIRTUAL AGC WAS
CREATED BY RON BURKEY:
APOLLO PI
magpi.cc/2b2oasx
>STEP-01
Train up your Raspberry Pi
Well need the latest version of Raspbian. If youve
not reinstalled Raspbian in a while it may be best
just to do a fresh install of Raspbian to your SD
card. You can find the latest image of Raspbian
here: magpi.cc/1MYYTMo
If youre installing fresh or not youll have to make
sure your Raspberry Pi is up-to-date. You can do this
by opening the terminal and using the following:
>STEP-02
Launch prep
For the code to work, we need some extra software
on Raspbian. You can install this with the following
command in the terminal:
IMPORTANT
used in the Apollo spacecraft
CODES
verbs:
05 Display Octal Components 1, 2, 32 Time from Perigee
3 in R1, R2, R3. 33 Time of Ignition
06 Display Decimal (Rl or R1, R2 or 34 Time of Event
R1, R2, R3) 35 Time from Event
25 Load Component 1, 2, 3 into R1, 36 Time of AGC Clock
R2, R3. 37 Time of Ignition of TPI
and go to magpi.cc/2gUodHb to get the zip file, or you 27 Display Fixed Memory 40 (a) Time from Ignition/Cutof
can download it in the terminal with: 37 Change Programme (b) VG
(Major Mode) (c) Delta V (Accumulated)
wget https://github.com/themagpimag/ 47 Initialise AGS (R47) 41 Target Azimuth and
projects-book-3/blob/master/agc.zip 48 Request DAP Data Load Target Elevation
Routine (RO3) 42 (a) Apogee Altitude
Youll need to unzip the file once its downloaded 49 R
equest Crew Defined (b) Perigee Altitude
(unzip agc.zip if youre using the terminal). Move it to Maneuvre Routine (R62) (c) Delta V (Required)
its own folder in the home directory to make sure its 50 Please Perform 43 (a) Latitude (+North)
all nicely contained before unzipping if you wish. 54 Mark X or Y reticle (b) Longitude (+East)
(c) Altitude
55 Increment AGC Time (Decimal)
>STEP-04 57 Permit Landing Radar Updates
44 (a) Apogee Altitude
Blast-off! 59 Command LR to Position 2
(b) Perigee Altitude
This part you need to do in the terminal within the (c) TFF
60 Display Vehicle Attitude
desktop environment. If youre in the command line, 45 (a) Marks
Rates (FDAI)
use startx and then open a terminal window. (b) TFI of Next/Last Burn
63 Sample Radar Once
From there use cd to move to the lVirtualAGC (c) MGA
per Second (R04)
folder that you unzipped (e.g. cd IVirtualAGC). After 54 (a) Rang
69 Cause Restart
thatm cd into the bin folder within and run the (b) Range Rate
71 Universal Update, Block
Virtual AGC with: (c) Theta
Address (P27)
61 (a) TGO in Braking Phase
./VirtualAGC 75 Enable U, V Jets Firing During
(b) TFI
DPS Burns
(c) Cross Range Distance
The option interface will start up. Select Apollo 11 76 Minimum Impulse Command
65 Sampled AGC Time
Command Module, click on Full on the DSKY option in the Mode (DAP)
66 LR Slant Range and
right hand column, and finally hit Run to use the AGC. 77 Rate Command and Attitude
LR Position
LUNA
Hold Mode (DAP)
68 (a) Slant Range to Landing Site
82 Request Orbit Parameter
(b) TGO in Braking Phase
Display (R30)
(c) LR Altitude-computed
PROGRAMMING
83 Request Rendezvous
altitude
Parameter Display (R31)
69 Landing Site Correction,
97 Perform Engine Fail
Z, Y and X
Operating the AGC is quite different to how we use Procedure (R40)
76 (a) Desired Horizontal Velocity
computers today. Calculations and queries were made 99 Please Enable Engine Ignition
(b) Desired Radial Velocity
using a verb and a noun code two-digit numbers
(c) Cross-Range Distance
that told the computer what to do. The verb was the nouns: 89 (a) Landmark Latitude (+N)
action that the astronaut wanted the computer to do,
11 TIG of CSI (b)Longitude/2 (+E)
while the noun was the data that the action needed
13 TIG of CDH (c)Altitude
to be done on. For example, pressing VERB and then
16 Time of Event 92 (a) Desired Thrust Percentage
05 followed by NOUN and 09 and then hitting Enter
18 Auto Maneuvre to FDAI Ball of DPS
will display (the action) the alarm codes (the data) if
Angles (b) Altitude Rate
theres any problems with the AGC. In short hand this
24 Delta Time for AGC Clock (c) Computed Altitude
is referred to as V05N09E.
MOON TIME
20:18:04 ON 20 JULY 1969!
Check the time since launch and set yourself up an Apollo clock on your Raspberry Pi
ne of the most basic functions of the AGC
O was for the computer to keep track of the
time. It was also an important function,
aiding with mission planning and also figuring out if
its too early in San Francisco to give someone a call.
The virtual AGC keeps track of time since launch,
or in this case time since the AGC was turned on.
We can check this time by keying in V16N36E.
From the list of codes, this means were asking for
the time (V16) of the AGC clock (N36). You might
see this split into LGC, which is the lunar guidance
computer that would have been the computer in
the Lunar Module, or CGC which is the Command
Modules computer. Both use the same AGC
hardware and code.
After typing in the code, youll get three lines of
numerical readouts. The top display will be hours,
the second display is the minutes, and the third
Right: The hours,
minutes, and display is in 100ths of a second. The display is updated
100ths of seconds
by the second, so you dont need to keep repeating the
are listed on
the display code to keep an eye on the time since launch.
IN THE
the computer was to be designed and programmed,
NASA went to MIT. In 1962, the project began and
paved the way not only for modern computers but
SIXTIES
also modern software.
In the Sixties, the term software was not as
widespread as it was today it was only really
known to those who made it or were very close to
the projects that required it. Coming off the back
Pioneering software engineering of older computers, the concept of software to the
at the dawn of computing hardware engineers was foreign and distrusted as it
wasnt a physical thing they could see, even if it was
Top: James Lovell (of Apollo 13) can be seen here a fundamental necessity.
taking a star reading during Apollo 8 next to him
is the AGCs control pad The whole thing was written in assembly
Left: Margaret Hamilton, then lead software designer language, as discussed earlier, but many new
on Apollo, tried to give legitimacy to software
engineering in a time when it was looked down upon
programming techniques were invented to make
sure the whole thing would work. Software could
SPACE Challenge!
CLOCK
How would you go about
calculating the time
since Apollo 11 landed?
Is it possible with the
five-digit display to count
The AGC is a programmable computer, so it stands
that many hours? How
to reason we can reprogram the clock to show the
many years can the AGC
current time. N36 can be modified down to the 100th
actually count up to?
of a second and we can modify it using V25; this verb
allows us to load a component (change the number)
in the readout of the noun, in this case the clock.
On the AGC, use V25N36E and the top line (R1) will
clear and you can change it to be the current hour by
pressing + on the virtual keyboard and then using the
numpad to key in the time. If you make a mistake, you
can press CLR to start again, but once youre happy
you can press ENTER and move onto the middle line
(R2) and set the minutes the same way. Remember,
for the seconds its in 100th of a second increments so
5 seconds would 500, 10 would be 1,000, etc.
Use V16N36E to display the current time from
this edited state. This will update every second like
it did before and allow you to use the AGC as a clock.
With a smaller screen and some inventive setting
customisation, you can make it your main clock
somewhere in your house. If you want to find out the
Left: The clock is
time since bootup, you can always use a different key
set to your specific
combination of V25N65E, and then return to your time. Its not a 24-
hour clock, though,
clock with V16N36E. When you restart the AGC, youll
so you may need to
need to reset the clock, though. reset it sometimes
SPACE
TESTS
Perform the vital tests needed to start
up your AGC and get to the moon
The crew of Apollo 13 required a special
onsider the situation youve just launched
C
startup process for their Command
Module computer during the final into space on a Saturn V rocket on your way to
stages of their fateful return home
the moon. Your spacecraft has performed its
docking operation between the Lunar Module and the
COMPUTERS
Command Module and youre well on your way. This is
when you need to check to make sure your computer
is working properly you dont want any problems
IN THE SIXTIES
when youre 100,000 miles from the nearest layby.
Check the status of your on-board computer by using
Apollo 13 Lunar Module and then follow these steps:
APOLLO
>STEP-03
Error counting COMPONENTS
USED TODAY
CODE: V 25E,
N01E,
01365E,
0E, 0E,
0E
Before we begin
the tests, we Integrated circuits
need to set the These were a revolution at the
count of total time, heralding a new future
failed self-tests, for computers. These are
total started still widely used in almost
self-tests, and all electronics in varying
successfully completed division tests to 0. We want to ways. You can also use a
make sure we know exactly how many errors we get in few with the Raspberry
this test alone. Pi on a breadboard, such
as an analogue-to-digital
>STEP-04 converter chip.
Monitor
the test
CODE: V 15,
N01E,
01365E Number pad
Weve reset the The calculator-style
counts; now interface on the AGC was
we get ready the first of its kind to
to monitor the use a number pad. As
tests. We have to well as the calculators
set up the three it inspired, you can see
lines of output to a very similar evolution
do this first. The of it on the number pad
first row (R1) shows the number of failed tests, R2 found on the side of a full
displays how many test have actually been made, and computer keyboard.
R3 shows the number of completed division tests. Image courtesy of NASA
>STEP-05
Begin Seven-segment display Image courtesy
of Peter Halasz
the tests While it didnt change the
CODE: V 21N27E, world like the integrated
10E circuit did, the seven-
The tests will segment display for
start and go showing numbers
through the is still used today
computer. These in fact, patents
will continue for it go back to
on as long as 1908. So when
you want them you plug one into
to and you can your breadboard,
stop them with remember this is a
V21N27E followed by 0E. Hopefully your computer technology that is a
will be fine and youll be on your way to the moon! century old!
REVIEWS
Improve your Raspberry Pi projects by discovering the best accessories
and add-ons with our definitive reviews
168 177
170
181
180
Reviews
166 IOT PHAT 180 ZEROSEG
A low cost wifi and Seven-segment
breakout HAT that fits displays on-top of a Pi
snugly on top of the Zero for hacker-style
Pi Zero countdowns
Maker 10 / $13
Says
There is
a thriving
community
building up
around the
ESP8266
platform
Pimoroni
PIMORONI
ESP8266 IOT PHAT
Add a low-cost WiFi HAT to your Raspberry Pi Zero and take control
of wireless IoT devices
he addition of wireless and to 802.11b/g/n networks on the the Pi Zero. But its still a job for
T Bluetooth to the Raspberry
Pi 3 has piqued our interest
2.4GHz band. It can be addressed
with SPI or a serial connection,
confident solderers.
Once youve soldered the
Related
in IoT devices, but what about the and has an AT command set that board, youll need to install
Pi Zero? The smallest board in makes it behave rather like an Minicom (magpi.cc/1RcdWOp),
the Raspberry Pi range is ideal for oldstyle modem. It has everything a text-based communications
ADAFRUIT low-cost IoT builds, but it doesn't you would need to connect a device program similar to MS-DOS Telix.
HUZZAH
feature built-in wireless. to a WiFi network. Raspberry Pi enthusiast Richard
ESP8266
BREAKOUT While its tempting to think Hayler has created a superb guide
Adafruit's
of the ESP8266 IOT pHAT as WiFi A wireless Zero (magpi.cc/2ipx87g).
Huzzah adds the for your Raspberry Pi Zero, this The chip itself came out in late The community has done a
ESP8266 chip to is a mistake, or at the very least 2014 and, during 2015, Western fabulous job of translating the
a breadboard-
an understatement. Sure, it can IoT enthusiasts translated its ESP8266 dataset from Chinese,
friendly
breakout board. add WiFi to your Pi Zero, but if datasheets into English. Pimoroni but its still a complex and niche
While it's not all you want to do is head online, has taken the ESP8266 and area. IoT enthusiasts should
an integrated
youre much better off using a turned it into a HAT-like board, certainly take a closer look.
HAT-like unit,
it's easier USBWiFi dongle. enabling you to combine the
than working The ESP8266 IOT pHAT is a processing power of the Raspberry
with just the
microcontroller.
way to get started with ESP8266, Pi with the wireless capabilities Last word
an extremely low-cost WiFi chip of the ESP8266.
The ESP8266 is an attractive
with a full TCP/IP stack and SoC Setup is moderately complex,
chip, and the combination of
(system on chip). ESP8266 was and youll need to solder the
robust TCP/IP communication
created by Chinese-based Espressif pins to the board. If you haven't
and Raspberry Pi power is
Systems, and hackers quickly done so already, youll also need
a compelling one. One for
realised it would be incredibly to solder the GPIO header to the
serious IoT project makers.
useful (and cheap) for building Raspberry Pi Zero. Both are quite
7 / $10
IoT devices. Hackadays Richard fiddly tasks, although we found
magpi.cc/2ioAtn6
Baguley explains: [It] can connect soldering the pHAT easier than
10 / $15
Maker
Says
A bright
RGB LED
with built-in
resistors
Monk Makes
RASPBERRY SQUID
COMBO PACK An RGB LED that makes learning code quick and fun, while also being
useful for other projects
ne of the first things There are many coding to get everything working together
O people usually do with
physical computing is
examples available for the LED
which rely on a central squid.
to create your own cool little
displays. Even when youre done
work out how to light an LED. py library this acts a lot like with the original learning side of
A pinout, a resistor, and a ground GPIO in that you just need to tell the components, theyll be good
pin are all you need to get it to it what you want the LED to do, for other projects and can easily
12 / $15
Maker
Says
Raspberry
Pi drum-kit
that lets
your fingers
think theyre
Stubblefield
Pimoroni
DRUM HAT
Hot on the heels of Pimoronis successful Piano HAT comes this hot
drum machine. Discover the joy of code-based finger drumming
while ago we came across of sample WAV files and programs enabled us to figure out the
A the Piano HAT, a snazzy Enter python drums.py and youll DrumHAT code. You can set
Related
piece of hardware based quickly have a drum machine ready the pads to react when hit, or
on Zachary Igielmans PiPiano and to play. A file called direct.py released, and you can get the
turned into a HAT (hardware on links the samples in the drums2 pads to call a function that can
PIANO HAT top) device by Pimoroni. folder, and you can edit the do anything.
The Piano
HAT is more The Drum HAT is its funky Python code to link to any folder Building a drum machine is
detailed, with 16 brother, capable of quickly you want. Then its just a case of where its at, though, and we had
touch-sensitive transforming a Raspberry Pi into creating some drum samples, or an awesome amount of fun with
buttons (forming
13 piano keys). a drum machine. On top of the downloading sample files from the Drum HAT (much more than
You can use board sit eight capacitive sensor a site likelooperman.com. with the seemingly more complex
the Piano HAT pads; you tap the beat out with Piano HAT). A good project
and Drum HAT
together using your fingers. Each pad also sports Amen to that to try out.
a Black HAT an LED that lights up when you tap We started by recreating Boots
Hack3r device. (or can be programmed separately). and Cats (youtu.be/Nni0rTLg5B8)
Installation is easy thanks using our sampled voices,
Last word
to a command listed on the then grabbed a bunch of
Easy to set up and fun to bash
Drum HATs GitHub page samples of the Amen Break around on, the Drum HAT turns
(magpi.cc/1VwzZWb). Just enter (youtu.be/5SaFTm2bcac) and set a Raspberry Pi into a home-
curl -sS get.pimoroni.com/ to turning a Raspberry Pi into a made 808 drum machine.
drumhat | bash to get started. kick-ass drum-and-bass machine.
15 / $20
This script installs the Python Taking apart the sample code
magpi.cc/1OALwNT
modules and downloads a bunch (and reading the GitHub page)
7 / $9
Maker
Says
Can be
mounted to
Raspberry
Pi Zero
back-to-back
UUGear
ZERO4U
Adding four USB ports to the Pi Zero, can it replace a USB hub?
hile the Raspberry Pi using the plastic standoff screws it, which is a nice touch. All four
W Zeros compact nature
makes it ideal for many
and spacers supplied. We were
slightly concerned about the pins
ports operate at standard USB
2.0 speed (480Mbps). The only
projects, the downside is that it maintaining a reliable contact, but caveat is that if you insert a USB
Related
only offers a single micro USB port didnt experience any problems. 1.1 device, theyll all be slowed
for connecting peripherals. So, to One detail to note is that since the down to 12Mbps, since the hub has
use it with a keyboard and mouse, testing pad positions are slightly a single transaction translator,
THREE- for instance, youll need a USB different on the two Pi Zero models but its not a major problem.
PORT USB adapter and a standard USB hub. the original v1.2 and new v1.3
HUB WITH Well, not any more with camera connector there are Last word
ETHERNET Designed by UUGear in the Czech two versions of the Zero4U to suit,
Youll need The Zero4U is an ingenious
Republic, the Zero4U is a four-port so you need to ensure you order the
a micro USB
USB hub thats mounted on the correct one. Either way, the Zero4U solution to the lack of
adapter to
plug it into the rear of the Pi Zero. Its four pogo can also be used with any other
standard USB ports on the
Pi Zero, but it Pi Zero. Theres no soldering
pins connect to the tiny PP1 (+5V), Raspberry Pi model via its mini
has the bonus required and its relatively
of an Ethernet PP6 (GND), PP22 (USB D+), and USB input, although the power
port for wired
easy to attach to the rear of
PP23 (USB D-) testing pads on the output is reduced in this case
connectivity. the Zero, which means the
Pi Zero. This enables it to take its unless you power it independently
GPIO header is kept free and
power from the latter, in which via its JST XH2.54 port.
unobstructed. As a bonus, the
case it can output up to 2A current Once the Zero4U is piggybacking
device can also be used as a
to all four USB ports. the Pi Zero and powered on, a blue standard USB hub for other
Since the pogo pins are only in LED lights up to show that its Raspberry Pi models.
surface contact with the pads, they operating. In addition, each port
10 / $13
need to be kept firmly in place by has a white status LED thats lit
magpi.cc/2aFJkx9
securing the Zero4U to the Pi Zero whenever a device is connected to
13 / $18
PICON ZERO A new robotics board from 4tronix that fits snugly on your Pi Zero
for some miniature robotics
i Zero robots are quickly as it allows you to easily access the up and maintain than rechargeable
nature of the Pi community and just of GPIO pins soldered onto the Pi The ins and outs
RASPI how useful the Zero can be in such a Zero, which is really not a massive One of the best things about the
ROBOT situation. Weve already got a new kit ordeal, although we know the idea of board is the numbers of inputs and
BOARD V3
from the folks over at PiBorg coming it is still a little scary for some. outputs it supports, especially for
Create slightly
soon after a successful Kickstarter, Its certainly worth it, as the Picon its size. Dotted around the PCB
different robots
with this board and plenty of little projects and Zero comes with a huge amount are inputs that accept digital and
that allows builds that use it for diminutive of benefits for robot building with analogue signals, as well as having
access to all the
automatons. Usually, these small the Pi. As you might expect, it can the ability to be configured to use
GPIO pins for
more manual robots use pre-existing small motor- power two motors; unusually for popular temperature and humidity
construction. controllers. However, we now also a motorboard, it can draw power sensors. Output-wise, its also fairly
have the Picon Zero from Pi robot directly from the Raspberry Pi for powerful, with configurations to
veterans 4tronix. this. This uses 5V, which the Pi can allow digital output, the ability to use
Its claim to fame is that its a provide but which it is rarely used PWM, standard servo controls, and
robot control board with the same for due to the power draw. With two even NeoPixel support.
size/form-factor as the Pi Zero. This small motors, its not so high; if its This is amazing for such a small
means it slots right on top of a Pi a little too much for the Pi, however, device. Some full-size HATs or
15 / $30
Zero without poking over any of the the Picon can also take USB power. controllers for the Pi can handle
magpi.cc/1VBwoYG
edges. This is particularly handy, This can be a little easier to hook motors and a HC-SR04 ultrasonic
Maker
Says
Intelligent
robotic
controller for
Raspberry Pi
4tronix
sensor input (which, by the way, the that are very simple to program if
Picon also has a dedicated input for), you have a cursory understanding
but then you still might have to play of Python. There are also some
around with some GPIOs to get the worksheets for teaching the ins and
rest working. The Picon is incredibly outs of using the library; at the time
comprehensive; it even opens up a of writing, however, they only get
small section of the GPIO port with so far as to teach you how to read
five GPIO pins and a selection of the input of a reed switch, and cover
Ground, 3V3, and 5V pins. nothing to do with motors.
One of the best things about such a small space. It does fit on a
regular Raspberry Pi as well, so for
Above An
5 / $7
Maker
Says
Add
motors to
(almost)
any Pi Zero
project
4tronix
PZM PI ZERO
MOTOR SHIM
Not quite a motor board like the MotoZero, this little shim
does let you control some motors with the Pi Zero
eve seen some tiny easily mount it directly to the Pi the speed. All very easy to use
W add-ons for Raspberry Zero if you wish. It does come and implement into your project.
Related
Pis and even the Pi Zero with some more straightforward We feel this particular shim goes
in the past, but this motor shim methods, as mentioned above: beyond robot projects; after all,
from 4tronix has surprised us the a female header so you can attach there are plenty of great dedicated
PICOBORG most with its size. About as long it to a Pi Zero with a set of 40 robot-centred motor boards.
Another simple as three micro SD cards laid end GPIO pins attached, or a male Motors can do more than turn
motor controller to end and not much wider (its header so it can just slot through wheels, after all, although if youre
that can be
38mm 16mm), this tiny bit of PCB the empty pins. It only needs six, making a particularly tiny robot,
used for robots
or other motor promises the ability to control two as well, and uses the last six pins the shim should easily do for that
tasks. It takes motors while taking up very little so that it doesnt take up the 5V as well.
up more GPIO
space in your project. and 3V3 pins at the front of the
pins,though.
The shim comes as a kit you GPIOs. Its quite clever, although
need to construct: the two motor it does mean you need proper Last word
terminals, a power terminal, and a external power for it, like most
It barely costs more than the
couple of methods of attaching it to motor boards.
Pi Zero, yet it lets you make
the GPIO ports. It does require a little The code for the board is quite
tiny robots or add motors
bit of soldering, but even the most simple, much like for the other
to any sort of Raspberry
novice wielders of a soldering iron 4tronix boards. Getting the Pi project. The minimal
should have no problem with this Python module from their site assembly is great as well.
and be done in about 20 minutes. lets you import it and give such
8 / $11
Due to how thin the board is commands as pzm.forward and
piborg.org/picoborg
(0.8mm, which is tiny), you can pzm.spinRight, and also control
20 / $26
Maker
Says
Complete
robotics
controller for
Raspberry Pi
4tronix
ROBOHAT
A full-sized Raspberry Pi robotics controller and the bigger sibling
of the Picon Zero. Should this be your controller of choice?
nother month, another connecting the popular HC-SR04 Its a good board for novices and
A robot board for your
Raspberry Pi; this time
ultrasonic distance sensor, and a
mixture of ten input and output
also some advanced users, allowing
you to take the skills you may have
were looking at the RoboHAT from pins, along with a series of I2C learnt from a very simple kit and
4tronix, basically a bigger version breakout pins. Its powered by a DC apply them to a custom project of
Related
of the Picon Zero we looked at last jack that can also handily power your own design quite easily. Its
issue. This board is designed to the Raspberry Pi while in use, easy to find out which GPIO pin
work with all 40-pin Raspberry Pis cutting down on power inputs. controls which aspect, so you can
PICON (so no original Model A or B, sadly) Its all more spread out than create further custom code if thats
ZERO and as its a HAT, it attaches neatly on the Picon Zero, so the board your thing, making it fairly open
A much more
on top of a compatible Raspberry Pi becomes a bit less of a mess when and versatile. Its also a pretty
compact version
of the RoboHAT, without hanging off the sides. everything is connected up and in good price at only 20.
designed for Like the Picon Zero, the use. There are also custom Python
the Pi Zero,
although it can
RoboHAT comes with an amazing scripts and libraries to get it all Last word
also be used number of inputs, outputs, and working, making programming
on a standard general robot connections to very easy. For example, importing A well-designed robot HAT
Raspberry Pi. that works very well with
make use of. It all comes pre- the robohat module allows for
soldered on a very sturdy piece robohat.forward() to move the the Raspberry Pi and many
of PCB, so youre ready to start robot forward. There are many common robotics components.
using it right away. On the board examples included to get your head Definitely worth a look if youre
are the requisite DC motor screw around how the library works, and planning to advance your
terminals; the RoboHAT comes theyre all very easily installed
Raspberry Pi robotics.
13 / $18
with two, enabling it to control two using the instructions on the
magpi.cc/1p9wGaA
motors. Theres a set of pins for 4tronix blog: magpi.cc/1TPBtWJ.
Maker
Says
Its
simple, easy
to use, and
looks great
Average Man
MOTOZERO This Zero-size board lets you control up to four motors independently
ichard Saville, who blogs Design considerations mention here is that, due to its
R as theAverage Man
(magpi.cc/1Ypo4ez),
Its obvious that a lot of thought
has gone into the MotoZeros
low cost, the MotoZero board
lacks any protection from reverse
came up with the design for the design. The terminal blocks are polarity, so you need to make
Related
MotoZero while watching his high-quality and chunky, making sure that your battery pack is
favourite TV show, Sons of Anarchy. it easy to connect your motor connected the right way round!
That biker influence has led to the wires; their screw-heads are a Since the MotoZero is supplied
PICON coolest-looking motor board weve decent size, too. These blocks in kit form, youll need to assemble
ZERO ever seen, resembling an exposed should certainly stand up to it, which involves a fair amount
With numerous,
configurable engine with its chunky terminals prolonged use. The main terminal of soldering. While some people
outputs and and twin socket-mounted driver blocks are grouped in pairs, after might be put off by this, Richard
inputs, this chips. The attention to detail even sliding the ridge edges together, reckons its all part of the fun of
fully featured
Zero-size motor extends to some piston graphics to avoid them being easily twisted playing around with electronics.
board is ideal on the board. Thats right, by out of place. Their positioning Depending on your soldering skills,
for complex the way: you get not one but two on either side of the Zero-sized it should take 30-60 minutes
projects.
motor driver chips, enabling the board is ideal for powering the to put together; helpfully, the
MotoZero to control four motors wheels on each corner of a robot. comprehensive PDF manual
independently. While the L293D A fifth terminal block is supplied contains a step-by-step assembly
chips used here have been around for the wires from your chosen guide illustrated with photos, while
quite a long time, they do the job power supply; alternatively, you the board itself is clearly marked
13 / $18
well enough, as they are fairly could solder them directly to with component positions and
magpi.cc/1p9wGaA
low-powered motors. the board holes. One caveat to labels. Its recommended to solder
10 / $13
on the 40-pin GPIO header first, One slight downside to using of most other motor boards,
followed by the two chip sockets, L293D chips is that they only one major plus point is that the
then the four motor connection supply 600mA continuous current MotoZero is simple enough to be
terminals, capacitor, and optional per channel (i.e. motor). This able make use of the GPIO Zero
fifth terminal block. Just slot the means that you will need to library, which should make it
two L293D chips into the sockets use motors with a stall current even easier for robotics novices to
and youre good to go. not much higher than that: the control motors with very few lines
manual states that you can get of code. Do bear in mind, however,
Twin drivers away with around 700mA, so long that if you do want to attach any
Once the MotoZero is assembled, as youre careful to avoid stalling robot sensors such as a line
its ready to control connected the motor and also keep an eye follower or ultrasonic distance
motors once slotted onto a on chip temperature. sensor youre going to need to
Raspberry Pi. Incidentally, while When it comes to controlling either wire them directly to pins
the MotoZeros form factor is a them, each motor channel is by using a stacking GPIO header
perfect match for the Pi Zero, and assigned three of the Pis GPIO (instead of the one supplied),
Zero-sized robots, it can be used pins (which have been chosen or you'll have to stack a HAT
with any 40-pin Pi model. carefully to avoid using any with underneath the MotoZero.
As mentioned, the L293D driver special functions such as I2C,
chips are old technology, but still SPI, and UART). While the first Last word
a good choice here since they are two pins are turned HIGH/LOW
low-cost thereby helping to keep or LOW/HIGH to make the motor While it lacks some of the
the overall price down and able turn forwards or backwards, as advanced functionality of
more expensive motor boards,
to handle a wide range of voltages: per usual, the third pin acts as a
including servo control and
from 4.5V to 36V. Handily, they master on/off switch. While you
GPIO inputs/through-holes
also have built-in overheating might well wonder what the point
for sensors, the MotoZero
protection and feature integrated of this enable pin could be, one
offers great value for money,
flyback diodes to prevent damage benefit is that it can be used with
looks very cool, and has the
from sudden voltage spikes from pulse-width modulation (PWM) to
unusual ability to control four
the motors. And even if they do get control the speed independently
motorsindependently.
damaged, the socket mounting on of direction.
the MotoZero makes them a cinch Although the Python coding
to replace. process will be similar to that
10 / $13
Maker
Says
Read
up to eight
analogue
inputs at
once
RasPiO
RASPIO
ANALOG ZERO
It makes the reading of analogue sensors as easy as Pi
hile its mini form factor up to 3.3V can be read directly; if analogue inputs, a couple of
W makes the Analog Zero
a perfect partner for the
the input is higher, youll need to
use a voltage divider made from
capacitors, a jumper switch, plus
a 40-way female header to connect
Pi Zero, its a great way to add resistors. Potential projects include to the Pis GPIO port. Handily,
easy-to-use analogue inputs to a digital thermometer, voltmeter, the board features through-holes
any Raspberry Pi model. Supplied and weather station, and kits for for 25 GPIO pins, along with a
as a kit, its based around the all of these were offered as part mini 54-point prototyping area.
Related
MCP3008 analogue-to-digital of the Analog Zeros successful Theres also the option to create
converter (ADC) chip, but avoids seven-day Kickstarter campaign. a sleeker version by soldering
all the intricate wiring usually If you require greater accuracy the chip directly to the board and
AD/DA required when using an ADC. than the MCP3008s 10 bits, you using surface-mount capacitors
EXPANSION The great thing about using this always have the option of swapping on the rear.
BOARD particular chip is that its already it out for your own 12-bit MCP3208
Based on the
PCF8591T 8-bit
supported by the GPIO Zero Python ADC chip for extra precision, since Last word
ADC chip, it has library with its own class, so its a it fits the same socket and is also
four analogue doddle to start writing programs supported by GPIO Zero. Even so, Wed have appreciated a
inputs, WiringPi
to read and compare up to eight the MCP3008s 1,024 steps should pre-assembled option, but
support, and
analogue inputs at once. Just use be enough for most projects.
once youve soldered the kit
can also do
DACconversion. components onto the board,
jumper wires to hook up your Although the Analog Zero makes
the Analog Zero really does
analogue sensors temperature things easier once assembled,
make it much easier to use
probes, light-dependent resistors, note that you do have to do a
multiple analogue inputs for
humidity sensors, gas detectors, bit of soldering beforehand, but
projects, particularly when
potentiometers etc. to any of the everythings well marked out
using GPIO Zero.
eight inputs in a female header, on the board. As well as the chip
10 / $13
then write a few lines of code to socket, youll need to solder on
magpi.cc/1syGYDs
get instant readings. Voltages the small female header for the
14 / $18
Maker
Says
Putting
your ports
in perfect
order and
protecting
them from
human error
RasPiO
RASPIO PRO HAT Is this electronics prototyping HAT the easiest-to-use ever?
ne obstacle that newcomers into that labelled socket: no more GPIO by wiring something up
O to Raspberry Pi physical
computing come up against
pin-counting! Nor is any extra
software required. The HAT works
incorrectly, although you still need
to take care not to directly short
is trying to figure out which pin perfectly with GPIO Zero, as well as 3V3 or 5V power to GND! One side
does what on the Pis GPIO header, other libraries. Its such as simple effect of this protection circuitry
particularly since theyre not solution, its a wonder no ones is that some components requiring
labelled. Previous solutions have thought of it before. more than the 10mA limit, such
included printing out a GPIO pin The third female header as buzzers, may be underpowered;
WILDLIFE
CAM KIT
Capture wildlife photos with this weatherproof, Pi-powered camera trap
ver wondered what kind of The latter are well-illustrated with screwdriver to push them into
E critters visit your garden plenty of photos, even if a couple place. A real-time clock module is
From 130/$171
Maker
Says
A camera
that anyone
can build to
take stealthy
high-definition
images of
wildlife
Naturebytes
10 / $13
Maker
Says
An
easy-to-use
8-character
7-segment
display add-
on board
Average Man
ZEROSEG
Build your own old-school red LED display
hile playing around with the latter, you also need to take the time you read this, although
W some generic spare parts,
including a standard
care not to touch previously added
components on the rear. Still,
some letters (such as M and W)
are impossible to reproduce on
seven-segment LED unit, Richard its fun to put together and you a seven-segment display. So its
Saville aka Average Man vs Pi get a sense of achievement when best suited to displaying digits;
(averagemanvsraspberrypi.com) its completed. use cases include a temperature
had the idea of creating a more To get it working, you need to monitor and time/date display.
PICO-8
Build, play, and share 8-bit games with this imaginary console
with built-in code-, sprite-, and music-editing tools
magine the best console PICO-8 runs just fine on the browser, so you can see what
I from the 1980s that you
never owned. As well as
Raspberry Pi hardware. Wed be
surprised if it didnt, because a
sort of thing is possible on the
Lexaloffle website.
being able to play free games, you key aspect is a deliberately limited
would be able to stop them at any feature set. The display is just Community service
Related
time and dive backstage. 128128 blocks with 16 colours. A vibrant community has sprung
You could tweak the code to Sprites are 88 pixels, and you can up around PICO-8, with one of
make it easier, harder, or different. only have 128 on screen at once. the most active fan bases weve
PYGAME The built-in sprite editor and The virtual cartridges (saved as seen. The forums are packed with
Pygame is a sound effects tools would let you PNG files) are limited to 32kB, and interaction between developers,
more powerful customise the graphics. And thered it has a four-channel sound chip. with everybody chipping in and
set of gaming
modules that be a level editor for building new Imagine it sitting alongside offering to help.
uses Python. stages or changing existing ones. a NES or PC Engine in terms If theres one downside, its that
It's not got the Thats PICO-8. Its a virtual of technical prowess. These PICO-8 is a paid-for program. But
same holistic
environment as games console, but instead of deliberate limitations make we think its great value given the
PICO-8, though, being an actual 8-bit console, PICO8 more engaging. The games amount of fun we had, along with
but you can it recreates a virtual console with have a retro-cool aesthetic and the active community.
build some
impressive built-in editing tools. theyre easier to build. The low-
games with it. PICO-8 was developed by Joseph spec nature of the console helps
Last word
White from his base at Pico Pico newcomers get started.
Cafe in Kichijouji, Tokyo. Its been Code is written in Lua. Its a We had a huge amount of fun
around for Windows, Mac OS X, relatively simple language to learn with PICO-8, and it's a natural
and Linux machines, but feels and mostly used for scripting fit for the Raspberry Pi.
more naturally at home on the Adobe programs. While its no
Free
Raspberry Pi, where it can become Python, Lua is worth learning.
pygame.org
the console it was meant to be. Games can be shared in a web
Maker
Says
Opens
up endless
possibilities
for tiny robot
designs
PiBorg
ZEROBORG
Control four motors independently with this versatile Zero-size board
from the robot experts at PiBorg
aspberry Pi robotics PWM (pulse-width modulation) simply holding the two units
R specialists PiBorg have
turned their attention
signal sent to each of the four
wheels can be varied precisely.
together firmly using the supplied
standoff screws, we were unable
to the Pi Zero and the possibilities Each H-bridge can deliver 2A peak to get this method to provide
of using it to make very small or 1.5A RMS current, so it should a reliable enough connection.
robots. The result is the ZeroBorg, work with most small motors. Once wed soldered the header to
a diminutive motor controller Alternatively, the board can be the Pi Zero, however, everything
board thats only marginally used to run two four-, five-, worked absolutely fine, so wed
Related
wider than the Zero itself. When or sixwire stepper motors. strongly advise doing this.
mounted to the rear of the Pi Alternatively, if your Zero already
Zero, the whole setup (including Stacks of fun has a full GPIO male header
MOTOZERO optional 9V battery) weighs a mere One curious aspect of the attached, you could always use
Resembling an 65g. Its so lightweight and nifty ZeroBorg is that its designed two 3-pin female-to-female
exposed engine,
that PiBorg used it to control the to be connected to a Pi Zero connectors to connect it; this
it can control
four motors YetiBorg racing robots in the first that has an unpopulated GPIO method would also enable you to
independently, rounds of the Formula Pi series. header. Instead, its supplied use the ZeroBorg with any other
though it
The inclusion of four H-bridges with a small female header to Raspberry Pi model.
lacks any
sensorinputs. means that the ZeroBorg can fit to the rear of the Zero, at the Its important to note that
control four standard DC motors 3V3 end of the GPIO header; into the ZeroBorg comes in three
independently. Add some special this you slot the ZeroBorgs six main versions. While the basic
Mecanum wheels and you can get pins, two of which connect to SDA KS1 model comes pre-assembled,
your robot to scuttle sideways like and SCL for I2C communication. the KS2 adds a DC/DC regulator
a crab! Even when using standard Now, while its possible to do and battery clip (supplied loose
10 / $13
wheels, the ZeroBorg offers extra this without soldering the small or pre-soldered) so that the
magpi.cc/1XRfqGQ
control since the bidirectional header to the Pi Zero, and instead ZeroBorg,motors, and Pi Zero
From 18 / $24
can all be powered by a standard Motoring on straightforward: for example, the Above left
The ZeroBorgs are
9V PP3 battery. Alternatively, We tested a pre-soldered KS2 ZB.SetMotor1(1) command is designed so they
an external power source ZeroBorg for this review, so all we used to supply maximum speed to can be stacked on
top of one another
such as a battery pack can be needed to do was solder the female motor 1. Use a lower number for less
attached to two of the ZeroBorgs header to the Pi Zero, screw in the power, zero to stop it, and a negative Above
Build full robots
terminals, enabling you to standoffs, insert the battery, and value to reverse. The examples with the tiny
mount it flat. The KS2 model also we were ready to roll. Well, almost. include joystick control, stepper ZeroBorg
includes an infrared sensor (more First, you need to ensure I2C is motor sequence, analogue inputs,
on that later) and a second six-pin enabled on the Pi, then install the and control using an infrared TV
male I2C header for daisy-chaining ZeroBorg software using a single remote; if yours isnt supported by
withother add-on boards, terminal command. Its then just default, its easy to record and save
the raw IR codes and add them to
Maker
Says
Its
ideal for
monitoring
conditions in
your house,
garage or
galleon
Pimoroni
ENVIRO PHAT This Zero-size add-on features four built-in sensors plus analogue inputs
hile not an official Alternatively, you could even using light.light(), you can
W Raspberry Pi standard,
Pimoronis pHAT class
solder the pHAT straight onto
the GPIO pins of a Pi Zero, if you
obtainRGB colour values with
light.rgb(), for a tuple which
of half-size add-on boards are wanted to use them together as a can easily be split into separate
great fun and match the Pi Zeros permanent room-monitoring or values. As you can see, the
form factor perfectly, although motion-measuring device. function naming structure used
theyll work with any 40-pin Pi Once the pHAT is assembled and by the library couldnt be simpler,
model. The latest addition to the mounted on the Pis GPIO header, so its all very easy to code. To aid
16 / $20
BUILT-IN SENSORS
Light: The highly sensitive TCS3472 colour sensor
enables you to measure the ambient clear light
level and RGB colour values, aided by twin LEDs
to illuminate objects.
the Raspberry Pi CPU beneath it. its ideal for measuring the motion and easy to use, aided by an online
Therefore, youll need to calibrate of people carrying it or objects tutorial (magpi.cc/29maHZT) to get
it by comparing the real ambient attached to it, although itll require you started and a few helpful code
temperature, using a standard a portable power source such examples in the GitHub repository
thermometer, to discover the as a phone charger. (magpi.cc/29M8bdD). With its small
difference; for us it was around Last but not least, the Enviro form factor, we can see the Enviro
7C, but it may vary depending pHAT features an ADS1015 ADC for pHAT being used with a Pi Zero to
on the setup. For a more accurate reading external analogue sensors. create IoT devices for monitoring
reading, you could always use a Located on a short edge of the board room temperature, light levels (to
remotely placed temperature sensor are six pins: 5V power output and possibly trigger electric lighting),
connected to the pHATs analogue ground, plus four input channels to and various other remote uses. By
input section: more on that later. take readings from sensors. Note using a stacking header, it could
that the input pins are designed to also be combined with another
Detecting motion measure signals between 0 and 3.3V, Pimoroni pHAT, such as the Scroll
The Enviro pHAT includes so if your sensors output is 5V youll pHAT with its LED matrix, to display
an LSM303D accelerometer/ need to create a voltage divider, its readings in situ.
magnetometer for detecting the using three identical resistors on
boards motion through three a breadboard, to lower it to 3.3V. Last word
axes (pitch, roll, and vertical) While Pimoroni says that in its tests,
and its compass bearing. The running 5V into the ADC inputs For portable projects requiring
latter can easily be calibrated didnt cause any adverse effects, the sensor data, the Enviro pHAT
to north, so long as you already readings wont be reliable unless could prove particularly
know where that is; its done you use a voltage divider. Its not useful. You could just mount
by setting a variable to its value much of a hurdle, though, and it on a Pi Zero and leave it
and subtracting it from the the inclusion of an analogue input on a shelf to monitor room
reading (with modulo 360) to section for connecting extra sensors conditions, for instance,
get the correct compass heading is a major bonus. logging its readings into a file
indegrees. Meanwhile, the Overall, with its similar
or database. The inclusion of
an ADC and analogue inputs
motion.accelerometer() tuple functionality, the Enviro pHAT is a
for external sensors is a
can be split into three variables, cheaper, more portable alternative
bonus for what is a fun, easy-
one for each axis. You can also to a Sense HAT, although without
to-use add-on with plenty
obtain the raw magnetometer the LED matrix and a few other
of possibilities.
data if you prefer. Since the features, but with the addition of
combination of Enviro pHAT and Pi analogue inputs for extra sensors.
Zero has such a small form factor, The Python library is very intuitive
10 / $10
Maker
Says
Aims
to give you
the most
compact
Raspberry Pi
power supply
possible
Pimoroni
LIPO SHIM
Reliable and portable power for the Raspberry Pi
he LiPo SHIM is a tiny SHIM to/from the GPIO pins, but automatically shuts down at 3.0V.
T addon board for the
Raspberry Pi that enables
it blocks the pins. Both options
require deft soldering skills.
This protects the battery.
The Pimoroni blog
you to power it from lithium In addition to the Pi Zero, you (magpi.cc/2d1YwCm) has detailed
Related
polymer and lithium ion batteries. can use the LiPo SHIM on any tests on how much usage you
The board itself is tiny. Raspberry Pi model. can expect to get in a variety of
Measuring just 0.8mm thick Once attached to the Raspberry common tasks, across the range
ANKER and weighing 2.9g, it doesn't Pi, the board gets its power from of batteries.
ASTRO E1 interfere with your usage of the a battery via a JST connector. Just In addition to the Pi Zero, you
5200MAH Raspberry Pi. charge up your battery, then plug it will need a JST charger for your
You can power It attaches to the eight GPIO in to power up the Raspberry Pi. battery, such as the Adafruit
a Raspberry Pi pins at the top of the pin layout Pimoroni is selling a range of Micro Lipo (7.50) or PowerBoost
using most USB
battery packs (covering the two 5V pins, 3.3V, LiPo and Li-ion batteries, ranging 1000 (20.50), both also available
designed for GPIO 3 and 4, and Ground). From from 4.50 to 18. from Pimoroni.
smartphones. here it provides power to the We tested a 1200mAh LiPo and
These are
bulkier and less Raspberry Pi, while leaving the a 2200mAh Li-ion battery. Both Last word
integrated than micro-USB power socket free. battery types function largely the
the Zero LiPo. There are two ways to attach same (plug and go). The board
It's a slick piece of kit, but
make sure you factor in the
the LiPo SHIM to the Raspberry Pi. uses a step-up boost converter
price of the charger and
You can either solder the board to (TPS61232) to convert the 3-4.2V
batteries. It's a great option
the bottom of the standard GPIO from the batteries to the 5V used
for providing safe power for
header, or you can solder it to a 24 by the Raspberry Pi.
a portable project, though.
female header. As the battery runs out, you get
13 / $18
This second option enables you an alert at 3.4V: a red low voltage
magpi.cc/2d21w1E
to attach, and remove, the LiPo warning LED comes on. The board
ZEROVIEW
Stick your Pi Zero with Camera Module to a glass window
with this suction cup mount
ne of our favourite uses screws and nuts to mount Weve hunted down the best
O for the Pi Zero is recording
time-lapse video with the
both the Pi Zero and Camera
Module. It took us about five
quality suction cups we could
find, says The Pi Hut, using only
camera connector (found on the minutes to screw it all together the best Adams cups made in
newer Pi Zero v1.3 and W). following the PDF instructions at the USA. Were so impressed with
Related
So we were delighted to get hold magpi.cc/2e89hWt. the performance of these suction
of the ZeroView. This simple board The Camera Module is mounted cups that we just couldnt use any
provides a suction cup mount and the cable tucked between the other brand.
RASPBERRY
for the Pi Zero, so you can stick Pi Zero and ZeroView. The end Whether its the high-quality
PI CAMERA
MOUNT it to glass. result is a compact, self-contained cups or the general lightness of
A cheaper Its ridiculously easy to set up camera device that can be stuck the package, its hard to fault the
option is to buy the Pi Zero to record pictures, to any glass surface. Combine it ZeroView. Its easy to set up, looks
a mount for just videos, or capture time-lapse with a battery pack, and set up cool, and sticks around all day.
the Camera
photography. A device that a script to automatically start
Last word
Module, but this
doesnt provide effectively mounts the Pi Zero recording, and you get a neat
a combined and holds the Camera Module camera package.
package. A neat product that transforms
comes in useful in a range of Weve had trouble with suction
the Pi Zero and Camera
projects, from home-built incar cups before, where devices have
Module into a portable,
dash cams to time-lapse fish dropped. With this in mind, we
stickable camera package
tank recordings. stuck the ZeroView to a window to
ideal for time-lapse and slow-
The Pi Zero is mounted using capture a time-lapse video, and
motion photography projects.
plastic screws. Inside the pack you started a stopwatch to see how
get a PCB (but just a plain board long it lasted. After an hour, we
3 / $4
with no electronic components), decided that it was going to be
thepihut.com
two suction cups, and spacers, there all day and stopped the test.
Maker
Says
Build your
computer
through
Minecraft
Piper
PIPER
Build a computer and then keep building it as you
play through a Minecraft adventure
O
nce again, weve come box together, with the engravings carry all the electronics pieces,
face-to-face with a giving you some visual clues on speaker, and mouse inside the
crowdfunded Raspberry what goes where. The poster is a laptop. Its not really so much of a
Pi laptop. With the pi-top not little unwieldy and you need lots laptop as a digital toy chest, with
even a year old, its interesting to of space for it, but construction is all your Power Rangers (buttons)
see something that, on paper, is fairly simple, if not a little lengthy. and Barbies (jumper wires), and
Related
a competitor for the same space. We sat through at least a couple whatever kids actually play with
A build-it-yourself laptop that of episodes of Star Trek: Deep Space these days (Star Wars figures?)
gamifies learning computing Nine getting it built, so it took kept inside, latched up and ready
PI-TOP through a custom operating system, about 90 minutes. to take with you wherever you go.
A similar the Piper is very different from The only thing its really missing is
concept but a
very different the pitop when it comes down to Some assembly a carry handle, although we really
execution, it, however. required wouldnt want to be swinging it
the pi-top First of all, construction of the The final build is chunky and around with loads of bits inside.
may be more
suitable for laptop is very different. While sturdy. The computer parts include The initial instructions take you
older kids and the pi-top feels like youre a nice 7 LCD display in the top, as far as getting the case built,
young adults. assembling the components for a a Raspberry Pi, a USB mouse, and and the Raspberry Pi and screen
real laptop, Piper feels like putting a portable power bank to power working. Plug it all into the battery
together a Meccano kit or wooden the whole lot. This makes it quite pack and you boot up into the
model. Laser-cut, engraved mobile, although youll need to Pipers OS. This starts with a fun
wooden sections slot into place, remember to charge up the power little video before launching you
held together by the odd screw. bank and keep an eye on its levels. into the Minecraft adventure that
216 / $285
Theres a big sprawling poster The most ingenious thing about helps you continue to build your
pi-top.com
with the steps needed to put the the Piper, though, is that you can laptop, adding the extra buttons
227 / $299
22 / $30
Maker
Says
An
unashamedly
old-school
LED matrix
display board
Pimoroni
MICRO DOT PHAT A versatile mini LED display with retro appeal
he LTP-305 LED matrices Dots own Python library, however, this is a very versatile
T used with the Micro Dot
pHAT boast a substantial
plus optional example scripts,
although for some reason we
retro-style display and certainly
a cut above the standard seven-
heritage, having been introduced ended up having to download segment alternative. And since
in 1971 by Texas Instruments. Now them manually. Running the each pair of matrices is driven
manufactured by Lite-On, they flash.py script is recommended by an IS31FL3730 chip, talking to
come in green and red varieties first, to check all the pixels are the Pi via I2C on addresses 0x61,
and feature 57 pixels plus a working. Other code examples 0x62, and 0x63, you should be
decimal point. Up to six can be demonstrate the displays able to use the display alongside
mounted on the Micro Dot pHAT, considerable capabilities and many other boards, such
included in the full kit (22) or possible uses, including an as the Enviro pHAT.
Related
purchased separately for 5 per excellent digital clock, animated
pair (the bare pHAT is just 8), bar graph, sine wave, and scrolling Last word
so you could opt for fewer to suit text horizontal and vertical. The
SCROLL your projects needs. Youll need comprehensive Python library Apart from the slight difficulty
PHAT to warm that soldering iron up, enables you to light individual in reading horizontally
While not quite as the full set requires connecting pixels; it also includes options
scrolling text due to the gaps
so fancy, this between matrices, this is an
118 pins: 13 each for the matrices, to alter brightness to fade text
all-in-one 115 excellent, highly versatile
array of white plus a standard 40-pin female in and out, and use a tiny text
retro-style LED display.
LEDs is easier header. Since each matrix has a mode to write smaller characters,
to assemble Superior to seven-segment
leg missing on one side, mirrored rotated 90.
and ideal for LED displays, it renders
scrolling text. on the board, theres no chance of While the displays high
characters in great detail and
accidentally inverting them. Youll number of small pixels results in
could come in useful for all
want to ensure theyre sitting well-defined digits and letters, manner of projects. You might
flush, though. which look excellent when shown even be able to play simple
With the soldering done, its one per matrix, horizontally games on it, like Pong.
simply a matter of installing the scrolling text isnt quite so easily
10 / $13
software with a single terminal read due to the gaps between
magpi.cc/2c38LH3
command. This loads the Micro matrices. Other than that,
7 / $9
Maker
Says
Add
emotion and
fun to your
electronic
creation
4tronix
MCROBOFACE This bright light-up face will add character to your projects
aunched via Kickstarter, a wheeled robot with an expressive Controlling the NeoPixels is easy
L McRoboFace is a PCB board
with 17 WS2812B RGB
face at the front.
Alternatively, you can hook
enough, as theyre numbered on
the PCB: 15 and 16 for the eyes,
LEDs, also known as NeoPixels. the McRoboFace up directly to 14 for the nose, and the rest for
These are fully addressable and the Pis GPIO pins 5V and GND, the mouth. Since theyre all fully
arranged in the shape of a face. along with GPIO 18 (the PWM addressable, you can adjust the
At full power, theyre blindingly pin) for precision control of the RGB shade and brightness of each
bright and, while their intensity is NeoPixels. While requiring a few precisely. This makes it possible
adjustable via software, wed advise extra setup steps, this method to create some very impressive
Related
purchasing the optional diffuser works perfectly well; no voltage fade and colour cycle effects.
kit to soften the effect; the frosted level shifting is needed, as the Using Python lists also enables
acrylic diffuser is easily fitted to pixels can be controlled using 3.3V you to easily change several pixels
NEOPIXEL the front using three nylon screws, quite happily. Incidentally, the at once for facial expressions.
RING nuts, and spacers. fourth McRoboFace pin is a digital
Available in
various sizes,
Either way, youll need to solder out for daisy-chaining with other Last word
on the supplied four-pin right- NeoPixel displays.
from 12 to 60
NeoPixels, angled header to connect it to your The Pi connection method McRoboFace is an inexpensive
these chainable Raspberry Pi. It can also be driven will determine the Python and fun way to add a bit of
rings are an
by many other microcontrollers, programming method for character to your robots or
alternative to other creations with facial
the standard including micro:bit, Arduino, controlling McRoboFace. Again,
NeoPixel strips. Codebug, BeagleBone, Crumble, a little more setup is required
expressions, or as a general
NeoPixel light display. You
and ESP8266. When using it with when using the GPIO pins directly,
could even hook it up to an
the Pi, you have two options. The including the importing of the
audio input, as Robin Newman
first method is to connect it via a neopixel (rpi-ws281x) library. Its
did (magpi.cc/2dxqZ4k),
Picon Zero, using output 5 set to not a major hurdle, however, as
to sing along to music!
WS2812B. Since the Picon Zero you can just adapt the example
From 6 / $8
also features two H-bridge motor code from the GitHub repo
magpi.cc/2dXaWLy
drivers, its an easy way to create (magpi.cc/2dxooY3).
Maker
Says
Connect
your
Raspberry
Pi to the
physical
world
Bare Conductive
PI CAP
A HAT that adds some interesting features to a Raspberry Pi.
Just how well does it fit?
are Conductive is one of HATs, it hangs over the sides of pads. These are the large gold
B those cool things we love
to see stuff made with.
the Raspberry Pi, though this is
a deliberate design choice which
connectors on the long edge,
which can also be used to connect
The conductive paint can be used allows easier access to some of to wires and which are ideal
in some amazing creative builds its features. While its designed for painting on with the Bare
and we love seeing people make with the Pi Zero in mind (the parts Conductive paint. Next to these
things with it and post pictures of the board that dont overhang is a large prototyping area with
Related
and videosonline. fit snugly over the Zeros form a GPIO breakout. Theres also a
To expand the uses of the paint, factor), it will work on any other Pi physical button and an RGB LED
Bare Conductive the company model with a 40pinGPIO. attached to the board.
RASPIO has created its own special HAT The board comes pre-soldered Its all really quite appealing.
PRO HAT for the Raspberry Pi, called the so you can use it out of the box. It adds a decent amount of useful
Although it
Pi Cap. HAT, Cap? The name is a You can put it straight onto a functionality for education and for
doesnt quite
have as many bit more than just a pun, as one Raspberry Pi from there, although creating some interesting projects
functions as of the boards most interesting this does require some degree of (you can find Capong in our last
the Pi Cap, its
features is the addition of software setup. The process is issue, but there are others on the
still a great
prototyping capacitive touch buttons/pads. well documented on the website firms website under Suggested
board for the Pi. Well get to that, though first, (magpi.cc/2eKcB5C), and you Tutorials: magpi.cc/2eKcB5C).
lets talk about the design. should be able to get it all set up We especially like the little
The Pi Cap works very much within half an hour. breakout area, which is useful
like a standard HAT, sitting on in any project. However, the
top of your Raspberry Pi and Internet of caps capacitive pads are also excellent
granting you immediate access to With the Pi Cap on and ready and the slightly larger holes in
14 / $18
more functions through the use to use, you have access to the the connectors make them pretty
rasp.io/prohat
of special software. Unlike most aforementioned capacitive touch good for wearables as well.
28 / $37
Thinking cap
We do like the build of the Pi Cap.
Its very robust and high-quality,
possibly even more sturdy than
the Pis themselves, which is quite
the accomplishment. All the
RASPBERRY PI
SAMS TEACH Aimed squarely at those new
YOURSELF PYTHON to both Python and Pi, the first
PROGRAMMING FOR
BESTSELLERS
three hours cover setup for both.
RASPBERRY PI IN 24 HRS That done, the next four hours
are spent on programming
LINUX COMMAND
Authors: Thomas H Cormen, of her system, with users, files,
Charles E Leiserson, and disks all covered well
Clifford Stein & Ronald L Rivest
Publisher: MIT Press
LINE in the first three chapters.
The chapter on working
Price: 44.95 Author: Sander van Vugt with text files starts with
ISBN: 978-0262533058 Publisher: Apress
magpi.cc/1VDJt3I mastering vi - the one
Price: 26.50
ISBN: 978-1430268307 editor found on all Unix
Perhaps the definitive reference magpi.cc/1VDJPHL computers. Further chapters
work and tutorial on algorithms, are usefully task-oriented.
but youll need a good grasp of Every user of Steering a middle path
mathematics, as well as some
programming experience, Raspbian, or any between quick introduction
to get the most out of it. other GNU/Linux and comprehensive
distribution, becomes in a small reference, Beginning the Linux
networking through Ethernet and chapter covers firewalls, Build a walking robot and add six
USB-connected network interfaces, web servers and wikis, wireless degrees of freedom, plus sensors,
the Pi 2 is, as Golden points out in access points, and network vision, and path planning.
ADAPTIVE
the book to make you think more Price: 149.00
seriously about the subject. Aimed ISBN: 978-3319260525
WEB DESIGN
magpi.cc/1VDKR6k
at developers, project managers,
and web professionals, 27 chapters, both practical and
its broad enough to be academic, giving comprehensive
Author: Aaron Gustafson coverage of open-source middleware
approachable for all, yet deep for autonomous robots.
Publisher: New Riders
Price: 21.99 enough to leave you with a
ISBN: 978-0134216140 practical idea of what needs to OpenCV with Python
adaptivewebdesign.info be done to make your site(s) By Example
a pleasant and informative Author: Prateek Joshi
Its a full house of experience for all visitors. Publisher: Packt
second editions Gustafson starts squarely Price: 31.99
this month, and with content sadly an ISBN: 978-1785283932
magpi.cc/1VDKVmE
Gustafsons is a afterthought for many
welcome update to this high-level designers, but the only thing Well-regarded guide to the practical
side of computer vision algorithms, that
yet practical guide to the why and everyone needs from a site.
enables the reader to understand the
how of adaptive web design. The Markup, visual styling, and problems and solutions.
approach here is more than adding interactions are then added to
responsive design for mobile
browsers. Progressive enhancement
a common base of universally
accessible content, ensuring each
I Robot
Author: Isaac Asimov
is the mantra, building site features user gets the best site for her Publisher: Harper Voyager
on a foundation of content thats browser, device, and screen size. Price: 7.99
accessible to all browsers and users. Practical, thoughtful, and a good ISBN: 978-0007532278
From GitHub.io project pages read, too. magpi.cc/1VDL9uf
to WordPress blogs, its almost Robots that think like us are still
inevitable that makers end up science fiction, but Asimovs pioneering
responsible for websites, and thus Score stories ask essential philosophical (and
relevant) questions.
for web design, so this could be
PROGRAM
RASPBERRY PI ARCADE GAMES,
but should keep you motivated
through the journey. Along the
C
and sorting, to sprites
A new generation of C tutorials for and array-backed
a new generation of programmers Author: Dr Paul Vincent Craven
grids will be gradually
Publisher: Apress
Price: 29.99
absorbed, until the reader
ISBN: 978-1484217894 has the skills to write their
magpi.cc/1W02yNA own games.
There is plenty of code
Based on in this book more than
Cravens popular wed normally expect
programarcadegames.com to see but Apresss
Author: Zed Shaw
website, and now in its fourth production is excellent here, with
Publisher: Addison Wesley
Price: 24.99
edition, this book does a superb job pages looking well balanced, and
ISBN: 978-0321884923 of fitting programming concepts beginners unlikely to be unnerved
magpi.cc/1TQkpD1 and Python learning to building by the sight of so much Python!
several games with the ever useful Plentiful exercises, including a
Pygame library. Programming whole chapter at the end revisiting
Zed Shaws famous type all
lessons are carefully introduced every project in the book, drive
of this in yourself method of
instilling learning, brought to throughout each game or game- the lessons deep. Well written,
C. Strongly opinionated but, if related project starting with well developed, and despite
you get on with it, a practical
type correctness in the opening eschewing the self-conscious
introduction to C basics.
calculator example. whimsy of some other tutorials
Aimed at younger readers, but very enjoyable to work through.
accessible to all, Cravens teaching
experience shows through in
both tone and pace: this is a book Score
that you will not finish quickly,
WITH C++
ISBN: 978-1484213728
signals. The powerful pispy
magpi.cc/1TQkJBu
captures GPIO data and in
the book is used to build an
Author: Warren Gay
A comprehensive C tutorial for oscilloscope. Practical electronics
Publisher: Apress
non-programmers that despite
Price: 29.99 feature in circuit designs for
missing appendices on setting
up a compiler wins friends ISBN: 978-1484217382 debouncing input signals.
through the excellent clarity of magpi.cc/1TQkeaS A C++ primer feels slightly
the authors explanations.
misplaced three quarters of the
C++ is a powerful way in, but you can skip forward
and complex beast, which does to that point at any time. Lastly,
little to protect you from your a multicore web server highlights
mistakes, and is not something the Pi 2s abilities, then leaves
we often see in a Pi project. the challenge of improving and
Authors: Stephen G Kochan
Nevertheless, if youve learnt the finishing the project to the reader.
Publisher: Addison Wesley
Price: 30.99
basics, you can build your skills Appendices on GPIO classes, and
ISBN: 978-0321776419 while experimenting with your other classes such as Matrix,
magpi.cc/1TQkIxs favourite single-board computer, which document those used earlier
thanks to this interesting tour in the book round off a book
of the Pi, its hardware, and some which may be essential, if you
Comprehensive, a classic (now
on its fourth edition), and very useful C++ programs. want to work on your Pi with C++.
detailed: serious but readable. Download the code from
If you struggle with pointers,
magpi.cc/1TQkoyY and youll
this could be the book to give
you that aha moment. get useful utilities like gp, which Score
manipulates and reads the GPIO
BUILDING THE
RASPBERRY PI WEB OF THINGS
The first introduces the basics:
the concept, a device to work on
BESTSELLERS
(enter the Raspberry Pi), and using
JavaScript and Node.js to glue
Author: Vlad M Trifa & things together. A hands-on
PACKT PYTHON
Dominique D Guinard
walkthrough in chapter two
Publisher: Manning
Price: 21.99 gets readers comfortable with
ISBN: 978-1617292682 using the Pi as a remote, web-
The best of Packt Python books magpi.cc/2aUEsTC connected device.
will hugely broaden your knowledge The second section also
Competing combines the theoretical and the
MASTERING
IPYTHON 4.0 DESIGNING behaviours: client server examples
are developed, broken into parts,
Authors: Thomas Bitterman
FOR SCALABILITY packaged into library modules, and
Publisher: Packt WITH ERLANG/OTP migrated to OTP-based generic
Price: 31.99 server behaviour. Then it
ISBN: 978-1785888410
Author: Steve Vinoski tackles finite-state machines
magpi.cc/2aUC5QZ
& Francesco Cesarini and event handlers,
Publisher: OReilly using a straightforward
Get interactive with IPython, not Price: 33.50
just as a rich workbook interface telephony example.
ISBN: 978-1449320737
to scientific computing, but for magpi.cc/2aUDTta Next, theres monitoring
developing for parallel and high- and handling errors with
performance computing. The
book covers testing and working Writing this as a supervisors, packaged
with R, Julia, and JavaScript. sequel to OReillys into the building blocks of
Erlang Programming, veterans applications, and then non-
DETECTIVE
gumshoe in a pre-industrial world
is found everywhere from the 1999
computer game Discworld Noir, to
PROCESSING
Learn to code with the open-source
Lindsey Daviss ancient language designed for the visual arts
Author: Jeremy Kubica Roman detective Falco.
Publisher: No Starch The key to making it work
Price: 12.99
Make: Getting Started
is to keep the humour light with Processing
ISBN: 978-1593277499
and the prose terse, which
nostarch.com/searchtale Author: Casey Reas & Ben Fry
Kubica does. Take a look at Publisher: Maker Media
his popular Computational Price: 17.99
Meet Frank Fairy Tales blog if youd like ISBN: 978-1457187087
Runtime. Disgraced a preview of his style. magpi.cc/2aUHSpE
Author: James Singleton book; other platforms (Mac, Well-regarded and comprehensive
Publisher: Packt Linux, and of course the Pi), intro, updated for compatibility with
Price: 34.99 other services (RabbitMQ Processing3 with new chapters on video,
ISBN: 978-1785881893 sound, data visualisation, and networking.
recommended as far better
magpi.cc/2aUG4x2
than Microsoft Message
Queuing), and other tools are
Welcome to Processing 3
From Why given a fair examination, and Author: Daniel Shiffman
Publisher: N/A
Performance is a many so-called ALT.NET choices
Price: Free
Feature, the first chapter, are recommended for working ISBN: N/A
this is a book that encourages caring with the new ASP.NET. vimeo.com/140600280
about how your code performs, After measuring, optimising,
to the ultimate benefit of the end and even searching for bottlenecks Inspiring look at whats new in
Processing 3 (more online resources
user, using profiling to eliminate in the network stack, the author are linked from processing.org).
bottlenecks in C# applications gives a good look at the downsides
on MSs latest web application of your improvements: there are Processing: A Programming
framework. Singletons introduction always trade-offs, and the burden of Handbook for Visual Designers
to getting the best performance on managing complexity and caching Author: Casey Reas & Ben Fry
.NET Core 1.0 is not your average and debugging issues is considered. Publisher: MIT Press
web application development Essential reading for anyone working Price: 55.95
ISBN: 978-0262028288
book; performance implications of with ASP.NET Core 1.0.
magpi.cc/2aUL2d4
architecture are weighed, with the
Raspberry Pi explicitly considered. Covering Processing 2.0 and 3.0, and
Yes, the Pi running .NET, and not Score updated for the new syntax, the definitive
reference from Processings co-founders.
necessarily with Mono.
SQL
and then using its components
FOR SECRET AGENTS for a number of pranks in bite-
Relational databases
remain the essential but
size projects. Video
unglamorous workhorses
Author: Matthew Poole follows, both with
Publisher: Packt
behind the Web of Things
the Pi Camera and
Price: 23.99
ISBN: 978-1786463548
controlling a TV through Beginning SQL Queries:
magpi.cc/2cCfOWM the HDMI interface. From Novice to Professional
Then the Pi goes off- Author: Clare Churcher
road with some stealthy Publisher: Apress
Learning by doing reconnaissance missions. Price: 19.99
goes even better From radio jamming to ISBN: 978-1484219546
magpi.cc/2cCgwmY
when fun and motivation tracking the Pi, projects
combine in mini-projects: here are fairly software-centric, and Great coverage of all the key topics
the projects are spy gadgets therefore require little in the in querying SQL databases, in a
reasonably beginner-friendly style.
or simple pranks, and this way of other components until
update over the previous edition the final chapters GPIO-based
(reviewed in issue 32) adds in projects, including a laser trip
MySQL Cookbook
Author: Paul DuBois
the miniaturised Pi Zero for even wire and an LED matrix to display
Publisher: OReilly
better gadgets, as well as the Pi secret messages. Along the way, Price: 56.99
3. Its an interesting collection of readers can pick up tips about real ISBN: 978-1449374020
projects, which reaches areas of random number generation, along magpi.cc/2cCfpUt
Linux and computing not touched with useful ways of connecting the
DuBois gives the right balance between
upon by many similar titles. Pi to the world, like SMS gateways. great examples and clear explanations
The first chapter introduces the of the theory behind them.
Pi and setting up, but jumping to
chapter 2 for the audio projects Score Introduction
there you get an introduction to to Databases
Author: Jennifer Widom
CREATING
Jekylls competitors, including Publisher: Stanford OpenEdX
Price: Free
the Python-powered Pelican,
BLOGS
ISBN: N/A
get a fair examination, and magpi.cc/2cCh3Fu
technologies necessary for static
WITH JEKYLL blogging Markdown, Git, and
styling tools like Bootstrap,
One of Stanfords three inaugural MOOCs,
now split into self-paced mini-courses,
covering different aspects of databases.
Author: Vikram Dhillon Foundation, SASS, and LESS
Publisher: Apress are introduced, before Jekyll PostgreSQL
Price: 27.99 itself is installed and examined Server Programming
ISBN: 978-1484214657 in a conciseroundup.
magpi.cc/2cCeUcO Author: Usama Dar, Hannu Krosing,
The Projects section presents Jim Mlodgenski & Kirk Roybal
interesting use cases which Publisher: Packt
If youre fed up walk through the practicalities Price: 30.99
with WordPress in a more applied way and, after ISBN: 978-1783980581
magpi.cc/2cCguLO
plugin problems and skimming earlier sections, are
slow page loads, youve probably probably where most readers Very good guide to working with
thought about a static blog. Static will spend their time. This PostgreSQL in Python, Perl, Tcl, C,
and C++, as well as PLpgSQL.
blogging, with its philosophy of section combines the practical
leveraging your coding knowledge (tags, Git, theming, Mailchimp,
The Practical
and letting almost nothing get in gem, Bundler, etc.) with food
SQL Handbook
the way of the writing, is a great for thought on platforms for
Author: Sandra L Emerson,
way of getting back control of your open debate, open research, and Judith S Bowman & Marcy Darnovsky
publication platform. This book open healthcare. Walk through Publisher: Addison Wesley
is about much more than simply the examples to gain a real Price: 43.99
setting up a static blog, starting appreciation of Jekylls potential. ISBN: 978-0201703092
magpi.cc/2cCg1tk
with somewhat laboured chapters
of background on how the internet This edition after 15 years in print
got where it is, but it contains Score remains one of the best SQL references,
whatever implementation you use.
useful material of real interest.
Subscribe from
Magazine
2.29 $2.99 or
rolling subscription
raspberrypi.org/magpi
202 The Official Raspberry Pi Projects Book raspberrypi.org/magpi
March 2016 202
SUBSCRIBE TO TODAY AND RECEIVE A
FREE
PI ZERO W
Subscribe in print for 12
months today and receive:
A free Pi Zero W (the latest model)
Free Pi Zero W case with three covers
Free Camera Module connector
Free USB and HDMI converter cables
UK EU USA RoW
Get six issues: 30 45 $69 50
Subscribe for a year: 55 80 $129 90
How to subscribe:
magpi.cc/Subs-2 (UK / ROW)
imsnews.com/magpi (USA)
Call +44(0)1202 586848 (UK/ROW)
Call 800 428 3003 (USA)
VOLUME 3
200 PAGES OF PI
Step into the world of coding with Raspberry Pi
raspberrypi.org/magpi