Professional Documents
Culture Documents
99
10
9 772051 998001
Welcome
WELCOME TO
THE OFFICIAL
MAGAZINE
PAGE 3
0
This magazine is printed on paper sourced from The MagPi magazine is published by Raspberry Pi (Trading) Ltd., 30 Station Road, Cambridge, CB1 2JH. The publisher,
sustainable forests and the printer operates an editor, and contributors accept no responsibility in respect of any omissions or errors relating to goods, products or services
environmental management system which has referred to or advertised in the magazine. Except where otherwise noted, content in this magazine is licensed under a
been assessed as conforming to ISO 14001. Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0). ISSN: 2051-9982.
raspberrypi.org/magpi October
April 2016
2017 3
Contents
Issue 62 October 2017 raspberrypi.org/magpi
IN THE NEWS
LEGO AND PI
RASPBIAN STRETCH
PRE-ORDER AIY ASTRO PI
UPGRADE
IN ASSOCIATION WITH:
WEEKEND PROJECTS 66 97
Start something amazing this Saturday
COMMUNITY
> TURTLE ROVER INTERVIEW 82
32 An outdoor rover designed by Mars Rover engineers
INSTAGIF
What else happened this month?
> EVENTS 92
CAMERA CAP 34 Places to go to learn about coding and Pi
Its like a dash cam, but for your body
> LETTERS 94
Have questions? We have answers
MESMERIC MIRROR 36
This mirror knows when
youre checking yourself out REVIEWS
RASPBIAN
STRETCHES OUT Meet Stretch, and discover all the new features in Raspbian
performance or quality.
As Raspbian follows Debians
update schedule, MySQL has
been dropped in favour of
MariaDB (mariadb.com).
Simon explains that we follow
Debian except in cases where
a) we have added a package
ourselves or b) we have fixed a
bug or changed functionality in a
Debian package. As this is neither
of those cases, we simply follow
Debian. Simon also notes that,
as Debian drops PHP5 for PHP7,
so does Raspbian.
INTELLIGENT
MUSEUMS A bespoke experience for every visitor
hrewsbury Museum
S & Art Gallery
(magpi.cc/2vIdFEB)
hosted a week-long hack, allowing
Microsoft and consultancy firm
Black Radley (blackradley.com)
to create an intelligent exhibit.
While many museums use
multimedia elements for certain
exhibits, these videos or talks are
the same, whether a child or a
70-year-old activates them. The
hack team wanted to do better.
The aim was to make a system
that would serve content suited to
the demographic and engagement Raspberry Pi 3. The Pi used a UWP Above The device uses a webcam that was
languishing in the back of the cupboard
of the visitor. (Universal Windows Platform)
on Windows IoT Core to access Joe explains that the Pi 3 was
Open source facial recognition algorithms via used because it is handy to have
Integral to the brief was that the Microsofts Cognitive Services the USB sockets for the webcam
project should use open-source Face API. and to power the speakers.
software and hardware costing Black Radleys Joe Collins You could use the project code
less than 100, so an old webcam explains that using a webcam (magpi.cc/2gCYfqQ) on a Pi
and speaker were hooked up to a gives us a bit of flexibility because Zero W, or as Martin points out,
on laptops, desktops, tablets,
AIY PROJECTS
VOICE KITS
PRE-ORDER Pre-order your Google AIY Projects Voice Kit
ollowing overwhelming The kits are made and
F popularity of the free
Google AIY Voice Kits
distributed by US retailer Micro
Center (www.microcenter.com),
we offered with issue 57, the as merchandise manager
kits are being made and sold Samantha Snyder explains:
as standalone products. Originally, we approached
You can pre-order kits Google with a large order of kits
in the UK from The Pi Hut to give away to our customers
(magpi.cc/2hkKbCI) and who purchase a Raspberry Pi 3,
Pimoroni (pimoroni.com/aiy) after the massive demand for
for 25, or in the US from Micro The MagPi kit.
Center (magpi.cc/2heOVxa). We immediately volunteered
to handle manufacturing and
As long as there is
Above The new AIY kit
comes with a 76-page The logistics, she adds.
MagPi Essentials book to
guide you from cardboard
Sold out?
to complete build
demand, we plan to You shouldnt have to worry
Below The new kit is easier
EDUCATION
LIST
As essential as a multimeter or microscope
RASPBERRY PI DESKTOP X86
magpi.cc/2wkkThL
he Raspberry Pi 3 has Global head of PR and External Now you can use Raspbian on your laptop or desktop
T made Farnell element14s
ultimate education list,
Communication, Holly Smart,
explains why the Pi 3 was chosen:
PC. Just download the image from rpf.io/x86 (or use
the DVD mounted on the front of issue 60) and install
making a Pi 3 as indispensable We believe the Pi 3 has one it to a USB drive using Etcher (etcher.io). Boot from the
to the engineer as a multimeter, of the best SBC [single-board USB drive to replace Windows or macOS with a fast,
oscilloscope or 3D printer. computer] propositions on the modern, and secure alternative.
Farnell element14 is a major market: compatibility, community
Europe-wide distributor of support, ecosystem, software,
electronics, technology and and tutorials; combined with
Below The Pi 3 is as essential and useful as this 5,500 Keysight N6705C Power Analyser
raspberrypi.org/magpi October
October 2017
February 11
News PI POWER SWITCH / ANDROID THINGS
REMOTE-CONTROLLED
PI POWER SWITCH Hackable board adds sofa-based power control
Left and below An IR,
resh from Kickstarter
F
remote-controlled
success, the Nanomesher power switch with
hackability
Hackable Switch has
hit the shelves. The device sits
between the power supply and
the Pis power input, essentially
adding a remote-controlled power
switch to the Pi. device because its a very nice
The hackable trick with the power switch, with some added
device is its socket-mounted hackability features. Whats not to
ATtiny85 Arduino Development like? We especially liked the fact
MCU. Lift this chip from its seat, that it comes pre-assembled with
plug it into a breadboard, and you an IR remote, all ready to rock.
can reprogram it to behave as Alas, the IR input of the
you like. hackable power switch means
Nanomesher provides a guide to its incompatible with the (RF)
reprogramming the teeny ATtiny OSMC Remote Control. The
chip: magpi.cc/2wDfrnz. hackable power switch is available
Tech tester and ModMyPi CEO now from ModMyPi for 22
Jacob Marsh wanted to stock the (magpi.cc/2eHjqeA).
ANDROID THINGS
ENHANCES PI SUPPORT
New Pi-specific features for better IoT devices
oogle has added a few Developer Advocate for IoT, web-like content (basic HTML,
G Pi-specific updates to the
latest build of its Internet
Wayne Piekarski, points to two
major updates in Android Things
for example) without the extras.
JavaScript, HTML5 video and so
of Things OS, Android Things. DP5: OpenGL ES 2.0 support and on can be injected back into the
WebView. Both of these features page, as detailed in the WebView
were highly requested features manual (magpi.cc/2wCCqki). As
from developers, according such, WebView might prove to be a
to Wayne. handy way to connect with an IoT
device as quickly and responsively
Flexible connections as possible.
OpenGL ES 2.0 is a graphical Finally, Android Things DP5
API for 2D and 3D graphics, so adds dynamic pin muxing
we can expect more visually for the Pi 3, with pins being
impressive Pi-based Android configured at runtime depending
Things interfaces. WebView allows on what features are being used,
Above The latest IoT OS from Google includes some
highly requested features for Pi support the opposite: its an API to show Wayne clarifies.
ASTRO PI IS T
he Astro Pi team is putting
together a new payload to
real scientists to design their own
programs and experiments.
GOING BACK
upgrade the two Raspberry Were preparing young people
Pi units on board the International for the jobs of the future, says
TO SPACE
Space Station. Dave Honess, Astro Pi Programme
The upgrade, due to launch in Manager. We want to show
January 2018, will provide two USB the possibilities of computer
WiFi dongles, five optical filters, programming as a digital skill,
and four 32GB microSD cards for and encourage young people of
ISS upgrade will add WiFi dongles the two Astro Pi units, nicknamed school age towards further study
Ed and Izzy. of STEM subjects and associated
to Astro Pi units Alongside the new launch comes careers Astro Pi being especially
a new set of missions for students. relevant to the aerospace industry,
Astro Pi is searching for the next which will see huge growth over the
generation of space scientists, and next 20 years. Astro Pi gives each
wants to inspire as many students student the opportunity to be an
as possible to take part in space active participant in space science,
science with code. rather than just an observer.
This year, there are two Having a creation of theirs reach
different missions for students space and do something there is
to enter (see Astro Pi Missions profoundly cool.
box). After registering for the Student teams can register for
The Atlas V rocket. Image credit:
NASA/United Launch Alliance missions, students will work like the missions at astro-pi.org.
ASTRO PI MISSIONS
This year, there are two missions available for Astro Pi.
Teams must enter by the deadline, but the competition
then runs into 2018 alongside the mission launch.
MISSION ZERO
magpi.cc/2fkznHZ
Participation closes: 29 November 2017
A non-competitive mission for young people
no older than 14
Write a simple Python program using free
online tools
P rovided you adhere to a few rules, your code
is guaranteed to run in space for 30 seconds
R eceive a certificate showing the exact time
when your code was running on the ISS
Recommended
PURCHASES
WANT TO MAKE SOME AWESOME LEGO PI BUILDS?
HERES THE INSIDE INFORMATION YOU NEED
LEGO PICK A BRICK
Buy individual LEGO bricks 3/$3
magpi.cc/2wOdXIS
Need some specific LEGO pieces? There are nearly 1,500
individual parts to choose from on the LEGO Pick A Brick
website, and prices start at a few pennies. A similar
service can be found in bricks-and-mortar LEGO stores.
Price
Its a bit too easy to lose an hour of your life on here
Varies
though, so be careful.
BRICKPI
LEGO Connect LEGO MINDSTORMS robotics
MINDSTORMS to your Raspberry Pi
EV3 magpi.cc/2weNxwt
Dexter Industries BrickPi is an amazing piece of kit. MICRO MOTOR
LEGO robotics kit It interacts with the popular LEGO MINDSTORMS kits LEGO ADAPTOR
magpi.cc/2xhMlgX to create robotic beasts, controlled via a Raspberry Pi.
The EV3 is the starter kit Several projects in this feature use BrickPi. LEGO wheel adaptor
for MINDSTORMS robotics for motors
projects. Combine the pieces magpi.cc/2weTAkF
From
in different ways to make Want to use LEGO for the
your own amazing robots.
$99/75 chassis of your creation?
It has been used with the For robots and other moving
BrickPi to make wonderful objects, that can be tricky.
creations in the past, and is This adaptor allows you to
used in some of the projects use micro metal gearmotors
on the following pages. (magpi.cc/2eYKHZR)
BRICKUBER
BUILD A RUBIKS CUBE-SOLVING ROBOT
USING THE RASPBERRY PI AND LEGO
JOHN COLE &
MATTHEW A.
he Rubiks Cube has
RICHARDSON
PARTS LIST T recently begun to make a
comeback. Solving it takes Two robot engineers with Dexter
BrickPi3 Base Kit thought, effort, and skill so why Industries. Matt builds robots in
magpi.cc/2wyukZX not let a robot do it? In this project, Michigan and John builds robots
we take a Raspberry Pi, a BrickPi, in Dubai. Both enjoy sand dunes,
LEGO MINDSTORMS EV3 and a LEGO MINDSTORMS set, and mountains, and playing with LEGO.
magpi.cc/2xhMlgX build a Rubiks Cube-solving robot. dexterindustries.com
Simply place an unsolved Rubiks
Dexter Industries Cube in the solver, run the Python
Power Battery Pack program, and your Rubiks Cube CODE
magpi.cc/2xb7IzG will be solved! The BrickPi3 takes Filename: BricKuber.py
the unsolved Rubiks Cube, while Language: Python
Rubiks Cube the Raspberry Pi takes a picture magpi.cc/2vYZPsT
magpi.cc/2xRaTcL of each side of the cube using the
Camera Module. This image is then
8 AA batteries used to solve the fiendish puzzle. >STEP-01
Building the solver
The BrickPi3, The shuffler This design was inspired by the
with motor and arm shuffles the MindCub3r design for LEGO EV3.
sensor cable Rubiks Cube, To build the BricKuber, start by
connections rotating the cube
building the MindCub3r using the
on the y-axis
instructions at mindcuber.com. The
design features three major moving
parts: a cradle to hold the Rubiks
Cube; a shuffler arm that is used to
turn the Rubiks Cube over; and a
camera arm that holds a Raspberry
Pi Camera Module over the Rubiks
Cube. Two LEGO MINDSTORMS
motors manipulate the Cube on
the horizontal and vertical axes.
Three different
motors are used
to manipulate
and read the
Rubiks Cube
BrickPi
BALANCEBOT
TWO WHEELS GOOD, FOUR WHEELS BAD:
BUILD A BALANCING ROBOT WITH A RASPBERRY PI
re you tired of robots with three or more
PARTS LIST A wheels? We have a solution! Using a pile
of LEGO and a Raspberry Pi, you can have a
BrickPi3 Base Kit robot wheeling around on two wheels in minutes. Our
magpi.cc/2wyukZX project uses the BrickPi3, which uses precise motor
controls to create a robot that balances on two wheels.
LEGO MINDSTORMS EV3 The project uses the LEGO gyroscope to detect whether
magpi.cc/2xhMlgX the robot is falling over, and a Python program on
the Raspberry Pi to control the motors with a PID JOHN COLE &
Dexter Industries (proportional-integral-derivative) algorithm. MATTHEW A.
Power Battery Pack To get going, simply build the robot, install the
RICHARDSON
magpi.cc/2xb7IzG program, and run!
Two robot engineers with Dexter
8 AA batteries Industries. Matt builds robots in
Michigan and John builds robots
in Dubai. Both enjoy sand dunes,
mountains, and playing with LEGO.
dexterindustries.com
The BrickPi3
and Raspberry Pi
are the brains of
the robot
The LEGO
motors provide
the power to the
robots wheels
The LEGO
gyroscope sends
data to the
Raspberry Pi to
keep the robot
balanced
Build A RETRO
CONSOLE CASE
DONT LIKE THE IDEA OF 3D-PRINTING A CASE?
HERES HOW TO MAKE A LEGO CASE!
ant to make a retro
PARTS LIST W console with your
Raspberry Pi? There are
LEGO several tutorials online, but many
magpi.cc/nespilego of them use 3D-printed cases.
Building with LEGO is much
RetroPie more fun than watching a 3D
retropie.org.uk printer whirr away, so heres how
to make a NES-like Pi case out
USB game controller of LEGO.
>STEP-08 >STEP-12
>STEP-09 >STEP-13
>STEP-10 >STEP-14
>STEP-28 >STEP-32
>STEP-29 SETTING UP
RETROPIE
Weve covered setting up RetroPie in the
magazine before, most recently in issue
55s PiGRRL Big Build (magpi.cc/2fczrWL).
The process is extremely easy, and
RetroPie guides you through the setup
step by step once youve installed
it on an SD card.
>STEP-30
Inspiring
LEGO PROJECTS
INCREDIBLE PROJECTS AND IDEAS
FROM THE RASPBERRY PI COMMUNITY
e love seeing your amazing LEGO projects.
W Young or old, its a great way to really fire
up your imagination and make something
amazing. Here are some of our favourite builds from
around the globe we hope they inspire you to make
something spectacular!
INTERNET
OF LEGO
The streets are
very detailed,
with Minifigures
going about their
awesome lives
URL
internetoflego.com
MAKER
Cory Guynn
LEGO
ARCADE
MACHINE
URL MAKER
magpi.cc/2wbUpuz Tobias Hbner
LEGO
SORTING
ROBOT
URL
magpi.cc/2wbmDpb
MAKER
David Pride
WALL-E
URL
magpi.cc/2wKb3oE
MAKER
Tobias Hbner
RFID MINECRAFT
URL
magpi.cc/2wdVdPu
MAKER
Spencer Organ
LEGO LASER
URL MAKER
magpi.cc/2wNyiOP Elijah Horland
BRICKPI BOOKREADER 2
URL
magpi.cc/2welg9o
The ingenious
solution to
MAKER turning the page:
Dexter Industries use a wheel
HOME ALONE
the BalanceBot on page 20)
HOUSE
created a Pi-powered LEGO
robot that could read a
Kindle. It uses the Pi Camera
Module to take a picture, and
then uses text-to-speech to
read the text aloud before
swiping across the screen URL MAKER
to turn the page. magpi.cc/2wNikE5 Christopher Hill
While that was cool, whats
even cooler is to build a robot This isnt a house full of traps The project
that works with a real book, to slow down a set of Minifigure uses sensors to
and so the Bookreader 2 burglars, however cool it might be trigger the actions
was created. It uses a wheel to wallop one with a LEGO brick of automated
to turn the page, takes a on a piece of string. Instead, this party-goers in an
picture, and reads it to you. house is a recreation of the scene elaborate LEGO setup.
We wonder if any young kids where Kevin manages to create We love the reference and
would like a robot to read the illusion of a party in his house the ingenuity behind making
them a bedtime story while through an elaborate, Heath it in LEGO, so we feel it definitely
we watch Black Sails... Robinson setup. deserves a place here!
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
....................................................................................................................................
$69 (USA) *If giving The MagPi as a gift, please complete both your own details (above) and the recipients (below).
Address ........................................................................................................................
80 (EU) Name and full postal address of your bank or building society:
$129 (USA)
Address ...........................................................................................................................
........................................................................................................................................
n n n n n n Account number n n n n n n n n
Branch sort code
Get three issues: Please pay Select Publisher Services Ltd Direct Debits from the account detailed in this instruction
subject to the safeguards assured by the Direct Debit Guarantee. I understand that this instruction
may remain with Select Publisher Services Ltd and, if so, details will be passed electronically to my
bank/building society.
$37.50 (US) (quarterly) SUBSCRIPTION PRICING WHEN PAYING BY CHEQUE OR CREDIT/DEBIT CARD
A Raspberry Pi 3 is connected to an
Adafruit PiTFT screen on the back of the
camera Abhishek dubs this the CamPi
Quick
Facts
INSTAGIF
NEXTSTEP
> The Instagif
is inspired by
the Polaroid
OneStep SX-70
> A Pi 3 and
Pi Zero W
are used
> The GIF fades Ever wished your instant camera could cope with moving images?
into view like a
Polaroid image Abhishek Singh has the answer!
> It took four
efore digital cameras Instant cameras were invented of the Raspberry Pi and moved
B
weeks to
design became popular, to speed up this process. Polaroid the instant camera into the 21st
and build
photographers would use became famous for making century. By inserting a cartridge
film to capture their images. Theyd cameras that could print out a with a tiny screen into his cool
take a set number of shots and send paper-based photo in seconds. retro-inspired invention, you can
their snaps away to be processed, A few shakes, and the image record a GIF, wait for the cartridge
but then theyd have to wait days would appear as if by magic. to pop out and, after a few seconds,
or even weeks to see the results. While instant cameras have fallen watch and enjoy the mini-video.
out of favour with the advent of Whats more, the device looks
digital cameras, the appeal of the just like a vintage Polaroid
concept endures. OneStep camera.
Something about holding a
Instant update moving image sounded intriguing,
Abhishek Singh certainly likes it. Abhishek explains. Its instantly
Motivated by the desire to build relatable, and it has the unique and
Right The something physical, and spurred exciting interaction of a physical
cartridge looks
on by his love of animated GIFs image coming out immediately that
like a Polaroid
picture, and is (my earlier projects have revolved you can hand to a person. I wanted
ejected using a
around them as well, he tells to recreate the experience of a
rack-and-pinion
mechanism us), he has harnessed the power Polaroid in a new way.
SNAP HAPPY
Instant design The Pis were trimmed and were ready, it was simply a case of
To begin with, Abhishek sketched sanded. The Ethernet port and a assembling them into the printed
out his plan on paper, before dual USB port were removed from plastic components that made up
turning to Autodesk Fusion 360. the Raspberry Pi 3, so the mounting both the camera and the cartridge.
His design had to take two units holes could be used for the Finally, Abhishek could point the
into account: the camera (dubbed camera chassis. Four circuits were camera, press the record button,
CamPi) and the cartridge (SnapPi). produced to manage the wiring and and watch as the cartridge popped
To produce the camera, he used distribute power, and Abhishek out and the GIF appeared.
a Raspberry Pi Camera Module, made his own USB cables. Major Was it worth it? The reaction
an iPhone lens, and an 8GB SD issues included finding a suitable has been super-positive, he says.
For me, it was not so much about
the learning curve being steep as the problems that arise every step
of the way.
PI CAMERA CAP Rather than keeping it under his hat, Mark Williams
Quick reveals how he made his GPS-equipped camera cap
Facts ho needs Google Glass altitude (with a pressure sensor) Building and coding
> The build
details are at
W to produce a first-person
visual record of their
and attitude pitch, yaw, and roll
of the camera, to enable images
While embedding the Pi Zero
and BerryGPS-IMU in the cap
magpi.cc/
day, when you can make a DIY to be subsequently corrected to was very quick and easy, it took
2xhKuZq
camera cap? Thats just what appear perfectly horizontal. Mark about a week to come up
> A BerryGPS-
Mark Williams did, using an old I saw an old article about with the main Bash script that
IMU provides
geotag data Nike baseball cap, a Raspberry recording GPS, pitch and roll calls Python code and other tools
Pi Zero, and a Camera Module. angles of photos and I thought to perform various functions.
> A GPS fix takes
1015 minutes Not only that, but hes added the Pi Zero with a BerryGPS-IMU My thinking was that I already
one of his own BerryGPSIMU could pull this off nicely, explains have Python code to track GPS
> The main
software is a boards, created with his Mark. Originally I was going to and read the IMU. Raspistill was
Bash script colleagues at Ozzmaker. place it in the top pocket of a shirt. used to take photos and Exiftool
> The data can The BerryGPS-IMU obtains GPS However, placing it in a cap would was used to edit EXIF data in the
be used to map coordinates to geotag the photos give you a wider range to take photos. I just needed to put it
your route
taken, as well as logging the photos in: just look and shoot! all together.
The BerryGPS-IMU
provides GPS coordinates
and other data
MESMERIC
MIRROR
Looking to brighten a dark
bedroom, Roberto Tyley decided
to cast fresh light on the idea of a
motion-sensing illuminated mirror
n reflection, he could have This shelf of electronics
Pi-powered
Robertos first decision was to put The Adafruit DotStar LEDs
a Raspberry Pi at the heart of the use a simple wiring system,
with four wires controlling
build. He had only ever used the the whole strip
computer once before, to create
a video demonstrating the speed
of a tool hed written to clean Git
>STEP-01
The handy compartment
My children love it, and they The electronic components sit inside this removable,
show it off to their friends easily accessible shelf. It includes a Raspberry Pi,
backplane connector, speaker, laser rangefinder, AC
when they come round power in, and power supply. The decorative brass
grille provides ventilation.
repositories. He liked the fact that can uniquely identify the pulses of
the Pi was a fully specced Linux light that bounce back, so its not
platform. It meant I could use the confused by secondary reflections.
tools and languages I was familiar To tie everything together,
with, he says. Roberto created a simple program
His next step was to research the in Python: The code polls the laser
best lighting, and he eventually rangefinder to work out if there is
chose Adafruits DotStar Warm an object closer to the top of the
White LED strips. They are more mirror than the mirror base. If there
expensive than simple strips, but is, it increments the brightness in
they use a pretty straightforward an array that tracks how bright all
wiring system, Roberto explains.
Adafruit also supplies a nice
the LEDs should be. But it wasnt
entirely straightforward. Creating
>STEP-02
Fixing the lights
Python library to control the strip the body of the mirror proved a
The LEDs fit behind the mirrors frame. Problem is,
from the Pi. daunting task.
they have a tiny computer running in each pixel, so
extra power taps are needed every metre or so to
Motion sensing Learning by doing keep the voltage level high, says Roberto.
From there, he looked for a way of Before I started, I had zero
detecting the presence of a person, woodwork skills Id been terrible
before hitting on the idea of a laser at it at school, Roberto admits. He
rangefinder. It occurred to me watched several YouTube videos
that if I had a laser rangefinder about making mirror frames (the
pointing straight down from the opposite sides really need to be
top to the bottom of the mirror, in the same length, he laughs) and
the same axis as the LEDs, it could he also ended up buying all kinds
sense how high up anything was, of powerful tools to get really
he continues. accurate mitre joints.
This would allow the LEDs to Still, it was worth it. During the
light up to the height of a person, grand unveiling, accompanied
or work out if they were stretching by the sounds of 2001: A Space
their arm up, and illuminate Odyssey, he watched the delight >STEP-03
further. I decided to use the on his childrens faces. It had Connecting everything up
LIDAR-Lite rangefinder, which is become an almost embarrassing The key I/O components use four-wire connections: I2C
a pretty cool but pricey sensor that addiction, he says of the process. for the LIDAR-Lite and SPI for the DotStar. Thankfully,
encodes digital fingerprints into But my children love it, and they the Pi can handle both. Roberto soldered the
the bursts of laser light it sends show it off to their friends when connections to an easily attachable Perma-Proto HAT.
out, he tell us. This means it they come round.
FM TOUCH SYNTH
Frustrated by unreliable iPad music apps, Toby Hendricks built
Quick a homemade touchscreen synth based on a Raspberry Pi Zero
Facts ot long after impressing Zero debut code line by line, you create objects
> It took a month
to build and
N us with his Raspberry
Pi Looper synth drum
While a Teensy 3.6 board is used
to handle the control data, all the
and start connecting patch cables.
Its great if you are coming from
program
thing (magpi.cc/2xZTAXR), audio created using a combination a non-technical perspective
> A resistive Toby Hendricks (also known as of FM and subtractive synthesis because everything is so easy
overlay is used
Otem Rellik) is back again with is processed in Pure Data on a Pi to understand visually.
(magpi.cc/
2gJSZll) another Pi-based musical device. Zero. This was my first project
BUILD A
TOUCHSCREEN
SYNTH
>STEP-01
Making a case
The wooden case was Tobys first project using
his new CNC machine. It houses the components,
Rather than displaying Above Toby is pleased with the case, including the matrix of RGB LEDs that sit under the
crafted using his new CNC machine:
information on a regular I think all my future projects will have touchscreen overlay.
touchscreen, Toby opted to use LEDs wooden cases
for everything, including menus.
Its a bit more archaic and cryptic. Live project
I like to make instruments that you Toby has already used the FM
really have to learn to use, and arent Touch Synth in live performances.
immediately super-accessible. Sort Its working out great! Ive
of like the old hand-held video been doing a lot of ambient jam
games I grew up with. sessions with it, turning the delay
One drawback is that the way up and feeding into my Pi
resistive overlay can only handle Looper. Its been a lot of fun.
one touch at a time, although a Toby would really like to make
workaround involves sustaining the synth available commercially,
notes. I added the sustain feature which is why he hasnt released >STEP-02
close to the end of the project the code yet, but hes already Teensy bit of help
because I wanted polyphony. The working on another Pi Zero Eight rotary knobs and the touchscreen overlay are
synth just sounds so massive when project: a looper in which wired up to a Teensy 3.6, which sends control data
you play it polyphonically. Perhaps you can manipulate the pitch to the Pi Zero and also handles audio output.
in the future Ill upgrade the screen and speed of the loop in four
to allow multitouch. different slots.
EDIT IMAGES
ON YOUR RASPBERRY PI
In spite of its size, the Raspberry Pi makes a powerful
Youll image-editing machine
Need
hen it comes to image editing on the MIRAGE
W
> Raspberry Pi
Raspberry Pi, you have several options. In our tutorial, were going to use something a little
> Raspbian
The default program, called Image Viewer, lighter, and a little cooler.
> Mirage
is based on GPicView. Its extremely fast and Were going to install a program called Mirage.
lightweight, and you can use it to rotate images. This is a lightweight photo viewer that can also resize,
At the other end of the scale is GIMP. Raspbian is built crop, rotate, and flip images. It features basic colour
on top of Debian, and most Linux users reach for GIMP editing and file management, and its perfect for our
(GNU Image Manipulation Program) for heavy image lightweight needs:
editing. Its capable of professional image retouching,
including perspective distortion and channel mixing. sudo apt-get update
The good news is that GIMP runs just fine on a sudo apt-get install mirage
Raspberry Pi. It could be accused of being overkill for
HOW TO:
quick image manipulation, but if you want to go the
whole hog, enter:
01
40 October
xxxx 20162017 raspberrypi.org/magpi
EDIT IMAGES ON YOUR RASPBERRY PI Tutorial
02 05
>STEP-02
Open Mirage
For slightly more power in your image editing, open
Mirage (Menu > Graphics > Mirage). Now, choose File
> Open Image and pick an image on your Raspberry Pi.
The Thumbnails Pane on the left shows all the other
images in the same folder, which makes it easy to
switch between images.
>STEP-05
03 Resize an image
Sometimes you need an image set to a specific size, for
use on a webpage or to display accurately in a document.
Choose Edit > Resize to open the Resize Image window.
Adjust the properties in the Width or Height boxes to
adjust the image size. By default the image will maintain
its proportions; deselect the Preserve aspect ratio box
to adjust the Width and Height independently.
06
>STEP-03
Rotate images
Its easy to rotate images. Select the image in the
Thumbnails page and choose Edit > Rotate Left/Rotate
Right. Use Flip Vertically and Flip Horizontally to
mirror-flip the image.
04
>STEP-06
Saturate
>STEP-04 While Mirage doesnt have the powerful
Crop an image colour-correction facilities of GIMP, you can adjust
Choose Edit > Crop to open the Crop Image window. the colour saturation (which is often the best tool for
You can draw a marquee selection box around the touching up an image). Choose Edit > Saturation and
smaller image in the preview window. Its dimensions use the Saturation level slider to change the value. As
will display in the X, Y, Width, and Height text boxes you move the slider, the image will display the new
(these values can be changed manually). Press Crop to levels. Press Saturate when youre happy with the
remove the unwanted part of the image. image. Use File > Save Image to keep your edits.
USE PDFS
ON RASPBIAN
PDF is a great format for sending and sharing documents, but you can do an
awful lot more with a PDF file if you know how
Youll
DF documents have all kinds of uses, from called printing to file). This lets you keep a record
P receipts and invoices from online shops, to that doesnt take up any space, and which you can
Raspbian
comes with a
PDF viewer, so
you can use PDFs
immediately
The PDF
viewer (XPDF) is
basic, but it can
open a complex
PDF perfectly
Use these
tools to search or
print the PDF, and
to make it more
readable
42 October
xxxx 20162017 raspberrypi.org/magpi
USE PDFS ON RASPBIAN Tutorial
01 >STEP-04 04
Searching a PDF
You can search a PDF for specific
words by clicking the binoculars
button at the bottom of the
window. Use Match case or Whole
words only to narrow your search.
>STEP-05
Printing a PDF
To print your PDF, click the printer
button at the bottom of the
window. You can print the whole
>STEP-01 document, or a range using the 05
Saving PDFs Pages boxes.
Whether youre viewing a PDF from an email, a
download, or a USB drive, save it to your Pi as you >STEP-06
would any other file. Installing Okular
If you want to edit a PDF, youll
02 need to install Okular. Go to Menu
> Preferences > Add/Remove
Programs. Search for Okular, tick
the box, and click OK. To open a
PDF in Okular, right-click on the
file and select Okular.
06
>STEP-02
Opening a PDF
Double-click on a PDF file and you will be asked
which application you would like to use to open it.
Open Accessories to select PDF Viewer, and tick the
box at the bottom to set PDF Viewer as your default
PDF program. >STEP-07
Editing a PDF
03 Open the Tools menu in Okular and click Review
to show the editing tools sidebar. To highlight or
underline text, select the text with the cursor (as in
a word processor), and click the relevant tool button.
You can also add notes and shapes to the document.
07
>STEP-03
Adjusting the view
To resize your PDF to fit the window, open the zoom
menu (click the downwards arrow next to the size box
at the bottom of the window). Choose a size, or use fit
width if you want the PDF page to be the same width
as the window.
MIKES PI BAKERY
Veteran magazine author from the old
days and writer of the Body Build series.
Co-author of Raspberry Pi for Dummies,
Raspberry Pi Projects, and Raspberry Pi
Projects for Dummies.
THE LARGE
magpi.cc/259aT3X
HEAD N RON
COLLIDER
Make a spooky
reaction game for
your Halloween party
t is time for our annual Halloween project, and spooky particles that are emitted when they collide at
Youll I publishing this at the end of September gives speed. Just like many of the worlds colliders, it works
Need
you plenty of time to get it working for your by sending Head one way round a ring of accelerators,
Halloween party. This time, its a game with Head the and Ron in the opposite direction. All you have to do is
Skull and Ron the Pumpkin, in a race to detect the to press the foot switch at the instant they pass each
> 12 mini skull
string lights
> Foot-operated
switch and jack
socket
> Resistors
and wire
The illuminated
skull indicates The illuminated pumpkin
the Head indicates the Ron
stream position stream position
THE LARGE 11 9
HEAD N RON
COLLIDER
0 8
>STEP-01
Making the board 30
1 7
Take a piece of 6 mm thick MDF, 330330mm
in size. Drill a hole in the centre and mark
two circles of 150 mm and 120 mm radius,
centred on the same point. We made a strip
of Perspex with three holes, and used a
screw in the centre and a pencil in each hole
2 6
to draw the circles. Then we then used a
30-degree set square and a ruler to mark the
position of the mounting holes, and drilled
them with a 3 mm drill bit. Next, we glued on
20 mm stripboard to make a tray, painted it
3 5
all with a flat black paint, and filed a slot on
the right-hand side for the foot switch cable. 4
Finally, we filed a slot on the back edge, near
position 10, for the 40-way ribbon cable. Inner ring - Rons positions 120 mm radius
Figure 3
Raspberry Pi GPIO Pins Schematic for the
Head n Ron game
14 15 18 23 24 25 8 7 12 16 20 21
43R
43R
43R
43R
43R
43R
43R
43R
43R
43R
43R
43R
GPIO 0 GPIO 1
Head LEDs ID_SD ID_SC
0 1 2 3 4 5 6 7 8 9 10 11
82R
82R
Foot switch
GPIO 2
3 4 17 27 22 10 9 11 5 6 13 19
Red Green
43R
43R
43R
43R
43R
43R
43R
43R
43R
43R
43R
43R
Speed LED
Ron LEDs
0 1 2 3 4 5 6 7 8 9 10 11
>STEP-02
Prepare the LEDs
Figure 4 Hit your foot switch now! simplest and cheapest option. If you want to develop
other games with more LEDs, we would recommend
using a buffer, such as the ULN2003A.
The construction of the project is shown in the
steps, and takes a bit longer than you might think.
The game
The game takes its inspiration from other forms of
large colliders. The two streams go round in opposite
directions. When they meet, they are diverted into
the same path, and they collide. You have a foot
switch to press when the two streams are at the
same point.
Watch out with 12 positions per circle, and
moving at the same speed, there may never
be a time when the two streams are at the same
point. The trick is to make them move at different
rates. Whats more, it takes time for the streams to
accelerate to a colliding speed, and this is signalled
when the central LED turns from red to green. If you
press the foot switch at the right time, as shown
in Figure 4, the screech of fundamental spooky
particles is released, and the collider starts again
only this time it goes faster! Once you miss, the
round ends, and youll be given a score based on the
number of correct hits.
>STEP-04
Wiring it up
Mark the positions (Head 112 and Ron 112) on the underside
with a pencil so you can identify the LEDs. Wire the GPIO
connectors to the appropriate LEDs through the appropriate
resistors. We used surface-mount resistors on the back of the
stripboard, mainly because we had them in stock at the right
value there is no advantage to using surface-mount resistors
over through-hole resistors here. Dont forget to add the jack
for the foot pedal as well it doesnt matter which way around
you attach it to GPIO 2. Use the threaded pillars to attach the
stripboard to the underside of the game, and the ribbon cable
>STEP-03 to attach the game to the Raspberry Pi. Do not underestimate
the length of time it will take to complete this step it took us
Mounting the LED shells over four hours, including using heat-shrink sleeving to extend
the LED wires.
Separate the two halves of the plastic skull
and pumpkin LED covers. Drill a 3 mm hole in
the base of the back half of each cover, and
attach each one to the top of the box using
a 10 mm M3 screw and nut. For positions 9
and 11, use a 10 mm threaded pillar instead
of a nut, as these will act as a mounting for
the stripboard. Drill a 5 mm hole in front of
each half shell, as close to it as you can, and
insert an LED of the appropriate colour. Fix
the LEDs in place with hot-melt glue from the
underside of the board. Finally, cut holes in
the bases of the remaining front-half covers
to fit around the LEDs, and clip the front and
back of each cover back together.
MAKE A
PODCAST
MACHINE
Your Raspberry Pi is a perfect pocket-sized PC for podcasting well show
Youll you how to record, edit and publish your own online radio programme
Need lthough its a little short on memory when sample rate of 44.1 kHz. This is Audacitys default
> A microphone A it comes to heavy-duty multi-track audio
editing, a passively cooled Pi runs completely
setting, so you won't need to change anything.
>S
peakers or
headphones silently, which makes it easy to create clean voice >STEP-01
> Audacity
recordings with minimal background noise. Get connected
These instructions will work perfectly on any Connect your speakers and microphone to your
>G
oogle account
Debian-based Linux distro, such as Raspbian or Pi. You can get away with using your TVs built-in
> Internet Ubuntu MATE. As youre going to be recording raw speakers via an HDMI connection, but connecting
connection
PCM audio, we recommend using a reasonably large headphones to the 3.5 mm analogue port makes for
microSD card if you plan to keep previous recordings a more private editing experience.
for posterity. A USB gaming headset with a built-in microphone
Although well be exporting the audio files at a will do in a pinch, but we recommend a USB condenser
lower quality, we recommend recording at a minimum mic for better quality voice recording. Were fans
OPTIMISE
ANALOGUE
AUDIO
QUALITY
The Pis
You can select external audio
headphone devices using Audacitys
port can add pulldown menus
unwanted
background
noise. To
Audacity defaults to a sample
minimise this,
rate of 44.1 kHz, which is fine
set your mixer for most recording projects,
volume to including this one
100 percent
and use a
good-quality
powersupply.
>STEP-02
Record your podcast
Install Audacity by opening a Terminal window and
typing sudo apt-install audacity. Open the
program, and make sure it is using the correct audio
input and output devices by checking the device
pulldowns on the taskbar, or by opening Preferences
from the Edit menu.
Before you start recording, we recommend
writing a script or prompts to work from. If you
stumble, justpause, go back a few sentences and >STEP-04 Above Use
Bloggers
start again you can cut out the error later. For Create your blog Enclosure Links
field to post
easier editing and processing later, it is often more Go to drive.google.com and log in to the Google your MP3 files
convenient to break longer recordings into 10- or account you want to use. If you dont already have a once you've
uploaded them
15-minute chunks. Google account, you can sign up for one on this page. to GoogleDrive
Go to blogger.com and sign in using your Google
>STEP-03 account. Create a Blogger or Google+ account. When
Edit and process the main Blogger interface loads, hit the Create New
Once youve finished recording, its time to edit Blog button. Pick a name, custom blogspot URL,
out any errors and use a few effects to improve the and theme.
recordings quality. To allow MP3 embedding, go to Settings > Other
To reduce background noise such as computer and switch the Enable Title Links and Enclosure Links
or fan hum, highlight a few seconds of audio with settings to Yes. Now select Save Settings at the top
only background noise. Select Noise Reduction from right-hand corner of the screen.
the Effect menu and select Get Noise Profile. Then
select your entire track, open Noise Reduction again, >STEP-05
and hit OK. Upload your podcast
To balance and amplify your recording if its In Google Drive, create an appropriately named folder.
too quiet, select the entire track and apply the Set the folders privacy to allow anyone with the link
Normalize effect using its default settings. Finally, to view the files in it. Upload your first MP3, right-
go to File > Export Audio, and encode your recordings click on it and select Get Shareable Link. Copy the link.
as MP3s we recommend 96kbps joint stereo Return to Blogger and hit the New Post button. Give
for voice. your podcast an appropriate title and description,
using the Title field and Post Body respectively. In the
Post Settings box on the right, select Links. Paste your
MP3s URL into the Enclosure Links field and give it
a MIME type of audio/mpeg3. Hit Publish, and we're
ready to go live.
>STEP-06
Launch your media empire
Go to feedburner.com and sign in with your
Google account. Paste your blogs main URL
GET LISTED
(yourcustomurl.blogspot.co.uk) into the Burn A Feed
box, tick I am a podcaster, and click Next. For extra
Select the feed you want to use we prefer the exposure, list
your podcast
longer-established RSS option, but Atom works too. on online
Feedburner will ask you to confirm the title and the directories.
address you want to use. The most
important is
Your podcast is ready for subscribers, but you should iTunes, which
click Next to fill in extra information for the iTunes you can you
podcast directory. Feedburner tells you what you need, join at
magpi.cc/
including an image and a more detailed description, 2x233hl
Above Feedburner turns your blog into a podcast feed that will
work with popular directories such as iTunes and Stitcher and can even provide listener stats.
SIMULATE CIRCUITS
WITH XYCE ON PI
Compile Xyce, an open-source state-of-the-art circuit simulator, on a Raspberry Pi
Change the CONF_SWAPSIZE from 100 to 2048 (the
Youll
here are many circuit simulators, such as
T SPICE, TINA or DoCircuits, available for use maximum possible), save, and exit. Next make the
cd ~/Downloads
tar xzf fftw-3.3.6-pl2.tar.gz
cd fftw3-3.3.6-pl2
./configure
make
sudo make install
Need I
n this tutorial, youll learn how to use
Node-RED to communicate with the
The positive leg of the LED is usually longer than
the negative leg, and it is the positive leg that should
Raspberry Pis GPIO pins. Node-RED be inserted into the left-hand side of the breadboard
> 1 LED is a drag-and-drop visual tool which comes in this diagram.
> 1 solderless pre-installed on Raspbian. Here, well create a
breadboard NodeRED flow to control LEDs. Start Node-RED
>4
male-to- By doing this, youll learn how to set up NodeRED Start up your Raspberry Pi. Click on the raspberry icon
female jumper flows and use them to control GPIO pins. Well in the top left-hand corner of the desktop screen, then
leads
also cover how to use Node-RED inputs, outputs, go to Programming > Node-RED. This should launch a
> 1 330 resistor and a switch (equivalent to a selection statement); window displaying information about Node-RED.
> 1 tactile push and how to use Node-RED to simulate a NOT gate Now open the Chromium web browser. In
button
acting on inputs from a button. Chromium, type localhost:1880 in the address
To start, wire up an LED to GPIO 17 on your bar, then press ENTER. This will display the
Raspberry Pi. Figure 1 shows how to do this. Node-RED interface.
+ _ + _
a b c d e f g h i j
1 1
2 2
3V3 5V
3 3
GP2 5V
4 4
GP3 GND
5 5
GP4 GP14
6 6
GND GP15 7 7
GP17 GP18 8 8
GP27 GND 9 9
GP22 GP23 10 10
3V3 GP24 11 11
GP10 GND 12 12
GP09 GP25 13 13
GP11 GP8 14 14
GND GP7 15 15
DNC DNC 16 16
Figure
GP5 1 GND
Wire up an LED to GPIO 1717 make sure you use the17
330 18 18
GP6resistor
GP12 as shown
19 19
GP13 GND
20 20
GP19 GP16
Your Raspberry Pi does not need to be connected to
GP26 GP20
GND GP21
the internet to use Node-RED: localhost is the address
the Raspberry Pi uses to refer to itself and :1880 Double-click on the node, and a configuration box Figure 2 The
default NodeRED
means that it is looking at port 1880. will appear (see Figure 3). Change the GPIO pin to window as
GPIO 17 and make sure Initialise pin state? is ticked. it appears in
Connecting to a GPIO pin Leave the setting for Initial level of pin on low. Give
thebrowser
Programs in Node-RED are called flows. You can see the node a name we called it Green LED because
that your blank page is labelled as Flow 1 in the tab at the LED we used was green, but if yours is a different
the top (see Figure 2). You can create as many flows colour, feel free to change the name. When you have
as you want, and they can all run at the same time. finished, click Done.
In this guide, we will create one flow.
The coloured blocks on the left-hand side of Injecting messages
the interface are the nodes. Scroll right down to Now scroll back up to the list of nodes. To turn the
the bottom of the list and you will see some nodes LED on and off, we need an input. In Node-RED, we
labelled Raspberry Pi. can inject messages into the flow and cause things to
You will see two nodes with the label rpi gpio: happen as a result. Drag an Inject node onto the flow.
these are the ones we will use to talk to the GPIO Double-click on the Inject node. Use the drop-
pins on the Raspberry Pi. The first one in the list, down menu next to Payload to change the data type
with the raspberry icon on the left, is for inputs. to string, and type 1 in the Payload box this will be
Using a button-push to control something would be the message. Type On in the Name box. Click Done.
an example of an input. The second node, with the Repeat the previous steps to create another Inject
raspberry icon on the right, is for outputs. Switching node, but this time add 0 as the payload message,
on an LED would be an example of an output. Drag and call this node Off.
an output node onto the blank page in the middle Now look for the grey dot on the right-hand side of
of the screen. the Inject nodes. Click and drag from the grey dot on
the On node to the grey dot on your LED node to join
them up. Repeat for the Off node, also joining it to
the LED node. Figure 4 shows how this should look.
Flow 1
On
Green LED
Off
Figure 3 Setting up a node for your flow Figure 4 Putting the flow together
msg.payload
On
Green LED
0
Off
Figure 6 Wiring
up the button
doesnt require
much more work
+ _ + _
a b c d e f g h i j
1 1
2 2
3V3 5V
3 3
GP2 5V
4 4
GP3 GND
5 5
GP4 GP14
6 6
GND GP15 7 7
GP17 GP18 8 8
GP27 GND 9 9
GP22 GP23 10 10
3V3 GP24 11 11
GP10 GND 12 12
GP09 GP25 13 13
GP11 GP8 14 14
56 October 2017 GND GP7 15 15
raspberrypi.org/magpi
DNC DNC 16 16
17 17
GET STARTED WITH NODE-RED Tutorial
msg.payload
Change to 0
Button If input is 1
LED
1
OK
Change to 1
Now join your Button node output to the existing Scratch or Python. You can configure it to have
Debug and LED nodes. Deploy the flow and test it by multiple output paths (outlined in red in Figure 8),
pressing the button. depending on the value passed in. In this case,
You will notice that the LED is lit to start with, we will set up the node so that if the property
and that pressing the button switches it off. Thats msg.payload is equal to 1, the first path will be
not quite right! This is because we are using pullup, followed. Click the small Add button at the bottom
so the button pin will be HIGH by default. HIGH
MONITOR A
HYDROPONIC
GARDEN
Set up a webcam with moisture sensors and remote access to ensure big yields
he cost of food is rising. Why not use your Pi Moisture detection and video monitoring will
Youll T to build a hydroponic garden? Eat better and provide the information you need to take care of your
Need
dodge those expensive food prices! Hydroponic hydroponic garden, and you can be alerted to any
growing is efficient, healthy, and easy to maintain problems via your internet connection. A simple home
especially when you can build a system that allows you web server is all you need.
> Motion to leave the garden, and monitor it remotely from an
magpi.cc/
2gVrlp2
internet connection, for under $50 (38). Visual monitoring
Growing pesticide-free, hydroponic, or organic Nothing can replace visual monitoring of your
>S
oil moisture
hydroponic produce has never been easier garden. Using your webcam, you can inspect your
sensor
magpi.cc/ especially now that the Raspberry Pi is here to help. crop from remote locations. First, youll need to
2gX3lSN A hydroponic garden might not be the first place you install Motion:
> USB webcam would expect to find a single-board computer, but in
>R
aspberry Pi 3
this project it provides essential video monitoring and sudo apt install motion
moisture detection.
The project also uses a Raspbian-compatible The next step is to edit the /etc/motion/motion.conf
plug-and-play webcam to provide the video, and file. You will need to edit it in a text editor such as vim
the Motion Linux tool to handle the monitoring. or nano:
To detect soil moisture, you can pick up a cheap
breakout board online. The sensor can be assembled nano /etc/motion/motion.conf
in minutes, with just a few connections that hook
up to three Raspberry Pi GPIO pins and a moisture- Carefully make changes to the file to match the
detecting probe. following code. Until you make these changes, the
There are two lights on the sensor The orange wire connects the
board one light will always be sensor board to GPIO 17, the red
on, and the other switches on wire to ground, and the brown
when water is detected wire to the power
stream_localhost off
webcontrol_localhost off
And finally:
vi /etc/default/motion
start_motion_daemon=yes
The sensor is hooked
up to the GPIO pins,
Restart the Motion service with sudo service and the webcam to
one of the USB ports
motion restart. Always keep in mind that you can HYDROPONIC
use the update-rc.d command to ensure that a FEEDING
program starts automatically after a fresh boot: WEBCAM INTERVALS
Use a timer
sudo update-rc.d motion enable Check the Raspbian compatibility of any webcam to run one,
before purchase. Youll find a list of Pi-compatible two, or more
predictable
When Motion saves video or JPEG files, they are webcams at magpi.cc/2gVs35G. feeds per day.
stored in the /var/lib/motion folder. By default, the
files are timestamped, and the most recent file is sudo apt-get update
REMOVE OLD
always titled lastsnap.jpg, which makes the file system sudo apt-get install apache2
IMAGES
easy to work with. sudo apt-get install php7.0 php-pear
Remove JPEG During a Motion installation, it is likely that libapache2-mod-php7.0 php7.0-mysql
images from
the folder where the files are saved will need new sudo apt-get install php7.0-curl php7.0-
the /var/lib/
motion folder permissions. To give that folder owner and group json php7.0-cgi
from time to permissions for Motion, type:
time to free up
With these packages installed, you should be able to
disk space for
future images. chown -R motion:motion /var/lib/motion view the new website at your IP address via a browser
or with a free online proxy. Make sure your router
At this stage, you should be able to access the can forward port 80 to let you see the webpage, and
Raspberry Pi from a browser (http://local_pi_ip:8081) optionally port 8081 for live streaming.
and see the streaming webcam video even after
a reboot. Monitoring water
The soil moisture sensor is a common Pi add-on,
Home web server and hooking it up is easy. The moisture sensor board
A home web server is the easiest way to access connects to three GPIO pins on the Pi: GPIO 17, power,
the most up-to-date picture of the garden from and ground. The sensor board is also connected to the
WIFI AUTO-
a remote location. It also allows you to interact metal plates of the moisture probe.
CONNECT
with the moisture sensor. To access your home The unit works straight away all you need to do is
To work server, type the home IP address into your browser. stick the probes into a pot. If you see only one light
effectively, If you dont know your IP address, you can find on the sensor board, add some water. After adding
the Pi should
always use the it at iplocation.net. water, you should see two lights. In our experience,
same network It only takes a few commands to install a web the moisture detection light illuminates after
IP address to server and PHP, and make your Pi into a home server. watering, but the sensor board can go down to one
connect to
your WiFi. To keep this tutorial simple, the following commands light within an hour, even though the soil or growing
show how to install the Apache web server and PHP: medium has retained some moisture. You can use
* * * * * cp /var/lib/motion/lastsnap.jpg }else{
/var/www/html/test.jpg && chown pi:pi /var/
www/html/lastsnap.jpg echo "<br/>It is on!<br/>";
Hydroponics basics
Although the focus of this article is about monitoring
the plants, it is helpful to know a little about vertical
hydroponics, which uses interlocking quad pots
stacked on top of each other.
When growing, tomatoes can be stacked two or
three pots high; lettuce, cucumbers, and peppers do
well with five or six pots stacked up. The stacking
gives very high yields per square foot.
To feed the plants, nutrients are delivered using a
pump that sends liquid nutrient through half-inch
polythene tubing. Along the half-inch header line,
barbed fittings are inserted so that quarter-inch
tubing can send fluid to each pot. Irrigation into the
pots takes place slowly, regulated by drippers inserted
into the ends of the pipes. your water and mix pH values will be consistent, so Above The author
in his vertical
Plant stakes are used to hold the drippers in place. you shouldn't need to test them very often. A pH of garden, which
At the very bottom of the system are individual 6.06.5 works for most vegetables, while 15001800 requires less
than ten minutes
threegallon (11-litre) pots that catch the waste ppm (parts per million) TDS indicates a decent of maintenance
nutrient. These bottom pots also hold plants. fertilizer salt concentration. When growing lettuce, every day
In each pot, you can use a medium like soilless mix, a lower TDS value (400-500) may be sufficient.
coco coir, peat/perlite mix, or even well-draining dirt. Hydroponically grown produce can yield big
As far as feeding is concerned, any hydroponic plant harvests and lots of growth, so be ready to supply
fertilizer is fine powders are often much cheaper some support for your giant plants! On the other
than liquid. A food-grade 55-gallon (208-litre) drum hand, lettuce is easy to care for, and many varieties
makes a good, cheap, food-grade nutrient tank. of tomatoes will trail downwards without requiring
When you mix a nutrient solution, a pH pen and any support.
EC/TDS (total dissolved solids) meter will help to As well as producing plenty of pesticide-free food
fine-tune the plant diet. You can cut costs by using all year around, a growing garden can bring enjoyment
pH test strips or a liquid pH test solution. Normally, and peace to your home.
WHY DOESNT THE RASPBERRY PI INCLUDE <INSERT WHAT IS ITS OPERATING TEMPERATURE?
NAME> PIECE OF HARDWARE OR <INSERT NAME> SORT The Raspberry Pi is built from commercial chips which are
OF PORT? qualified to different temperature ranges; the LAN9514
Our main aim is a charitable one: we are trying to build the (LAN9512 on older models with two USB ports) is specified
cheapest possible computer that provides a certain basic by the manufacturers as being qualified from 0C to 70C,
level of functionality, and keeping the price low means while the SoC is qualified from -40C to 85C. You may well
weve had to make hard decisions about what hardware find that the board will work outside those temperatures,
and interfaces to include. but were not qualifying the board itself to these extremes.
W E E K E N D
P R O J E CT S
GOT A GAP IN THE DIARY?
FILL IT WITH AN AWESOME RASPBERRY PI PROJECT.
hat will you say when your
W friends and colleagues ask
you what you did at the
weekend? Watched a film, went out
for lunch, or had a lie-in?
Give them a better answer: in this
project roundup we show you what
you can achieve in two days. You
could build a robot, upgrade your
familys toys, or fashion a sparkling LETS GE
MAKING! T
bag. You could connect your fridge
to the Internet of Things, or hack a
stereo to play your theme song when
you walk into the room. Grab y
our too
Many of the projects are family- ls, toys
and Pis
friendly, so younger makers can join , and m
someth ake
in. Lets get started! ing am
azing t
weeke his
nd!
MAKE A
eres a cool project: a drinks
H fridge that uses a scale
to work out how many
bottles are inside, a temperature
SMART
sensor to help you keep the beers
chilled, and another sensor to
detect when the door is opened.
The data can all be streamed to a
FRIDGE
webbaseddashboard.
Jamie Bailey conceived the project
as a way to stop his house-sitting
19-year-old nephew from stealing
his beer. Now, if a bottle is removed
from the fridge, Jamie gets a text
message and can call his nephew
DO YOU NEED TO BUY MORE to warn him off before the bottle is
even opened.
BEER, OR IS SOMEONE AT HOME I decided early on that a
TALKIEPI
DO YOU WANT TO MAKE INTERNET-CONNECTED WALKIE-
TALKIES FOR ALL THE FAMILY? THATS A BIG TEN-FOUR!
atching Netflix series a push-button to use when talking,
W Stranger Things inspired
Daniel Chote to make some
and two status LEDs at the bottom
of the speaker. One is illuminated
DANIEL CHOTE
big ol 1980s walkie-talkies for when youre connected to the Daniel is a believer that
his family. His children Eddie (6) Mumble server, and the second everyone can learn new
and Ollie (3) can use them to chat lights up when other people are in things. If something
to each other, and to their friends, the chat room. A third LED inside interests you, there really
through an internet-based server. the button lights up when the
isnt anything stopping
The software core is Mumble, TalkiePi is sending your audio.
you from attempting to
an open-source voice chat system Daniel designed a case to house
designed for use by PC gamers. the device using Autodesks 3D CAD do it yourself.
There are clients for a range of software Fusion 360. The case was magpi.cc/2vsqMtx
operating systems, so the TalkiePi, printed using a Monoprice Select
as Daniel has named his project, is Mini 3D printer.
compatible with many other apps For now, the device is
and devices. The software can be powered using a wall socket, but
used to connect groups of people possible enhancements include
who can chat to each other, like portable power.
using channels on a traditional You can find Daniels code
walkie-talkie. and 3D-printable design files at
Daniel used a US Robotics USB magpi.cc/2vKbHP3.
Speakerphone, which sells for less Daniels advice to other makers?
than $12, as the heart of his device. Keep it simple be creative,
He removed its case and connected he says. Dont be afraid to learn
its board to one of the Raspberry new programming languages, or
Pi3s USB ports. even something like Fusion 360
He wired up some simple for CAD.
components to the Pis GPIO pins: Roger that!
MAKE A
ROBOT
MAKE A ROBOT IN A WEEKEND,
WHETHER YOURE MAKING YOUR
FIRST OR ADDING TO YOUR ARMY
hen Mark Norwood saw a two of the toys together to create a his Chromebook to view the user
W 5 spider robot toy in Tiger,
he thought: That would
spider that can walk forwards and
backwards, under the control of a
interface running on the Pi Zero.
This is Marks second robot based
make a great Raspberry Pi project for Raspberry Pi. The robot, Mr Nancy, on the CamJam EduKit 3, following
someone! Hey, that someone could uses the right legs from one toy and his Robocroc which motorised a
be me! the left legs from another, so they plastic shoe. The kit is cheap, and
The toys scuttle forwards when the can be controlled independently. has everything you need, with good
power is on, but now Mark has joined The robot is based on the instructions on the CamJam site,
Raspberry Pi Zero W. Mark uses parts he says. Everyone in the community
from the CamJam EduKit 3, which knows it, so they can give you help if
MARK NORWOOD provides everything you need to you need it.
make a simple robot in particular He found the GPIO Zero examples
Mark Norwood is a teacher the motor controller board which on the Raspberry Pi website helpful,
working in Bedfordshire, enables the Pi to control the motors. and his advice to others building
specialising in teaching The Raspberry Pi is powered using a robots is to dabble with GPIO Zero,
young people with behaviour power pack from Poundland, while because it massively reduces the
four AA batteries drive the legs. amount of coding you have to do.
problems. In his spare time
For the software, Mark used Marks website includes a
he walks, he dreams, and is
a combination of Scratch for detailed photo essay showing the
a Cub Scout Leader. line-following, and Python for construction of Mr Nancy, and you
magpi.cc/2vsnhDs the distance sensor and obstacle can find out more about the CamJam
avoidance. He uses RealVNC on kit at magpi.cc/2xxPy8X.
DOORJAM
WITH
WEEKEND PROJECTS
EPIC
MORE IDEAS TO ROUND OFF YOUR WEEKEND IN STYLE
PI TOTE
Amanda Haughs designed a tote bag with a Pi Zero
concealed in a pocket. It controls seven 5 mm clear
white LEDs in the embroidered Raspberry Pi logo,
which light up in a random order. 8-inch female-to-
female jumper cables are used to connect the LEDs
to the Pi and resistors. Amanda used GPIO Zero to
pulse the lights, and a cell battery for power. The
rc.local file was edited so that the program runs
when the Pi boots.
magpi.cc/2vrVIKB
MICRO:BIT-CONTROLLED RADIO
Giles Booth made a radio to access the micro:bit from the Pi,
controlled by a BBC micro:bit, and mpc and mpd to configure and
using the buttons to change stream the stations. The os library
stations and the tilt control for is used to send MPC instructions to
volume. The micro:bit also displays the command line. See Giless blog
the station number. Giles used for instructions, code, and a video.
David Whales bitio Python library magpi.cc/2xNc39m
LEGO BOAT
Ten-year-old Ozzy Hayler made a Pi-driven
LEGO boat, using a balloon for buoyancy.
The Pi Zero uses the Explorer pHAT as a
motor controller, and it drives a micro metal
gearmotor. Power comes from a LiPo battery
and LiPo shim. The remote pins function of the
GPIO Zero library is used to control the Pi from a
laptop. Keep the motor and Pi dry, he advises.
I tested it in a bowl of shallow water first.
magpi.cc/2grYg4l
ARCADE MACHINE
With Lakka and Recalbox in NOOBS, and RetroPie readily
available, there are lots of software options if you want
to play the games you grew up with. There are several
controller options, too: Pimoronis Picade supports
joysticks and arcade buttons, and The Pi Hut makes a
SNES-style gamepad. Nate Douglas made this arcade
cabinet based on RetroPie using a Pi 3, half-inch
medium density fibreboard (MDF), a Samsung
22-inch LED monitor, speakers, and a keyboard.
magpi.cc/2vuCZhc
Maker
Says
An easy-
to-build robot
arm kit that's
designed to
get children
learning
about
technology,
engineering,
and
programming
Mime Industries
MEARM PI This fun robot arm will grab the interest of children and adults alike
ong-time readers of puzzle was the need for users find Not only that, but the arm
L TheMagPi may recall that
we reviewed the original
their own way to drive the servos
from a Raspberry Pi. The new
itself has been completely
redesigned, eliminating two-
Related
MeArm back in issue 33. While we MeArm Pi solves the problem by thirds of the screws and using
loved the concept of an affordable, including a HAT with twin on- new fixings to make it easier
open-source robot arm, we did board joysticks, so now you have to build. It certainly is a lot of
MAPLIN note that a missing piece of the everything you need in one kit. fun to put together, like a cool
ROBOTIC motorised Meccano set. Step-by-
ARM Below The joystick controls
step illustrated instructions are
are on a HAT that slots easily
Connected via onto the Raspberry Pi supplied online two versions,
a USB port,
this robot for a standard-size Pi or a Pi Zero.
arm can be Most of the acrylic pieces simply
controlled from slot together, secured by a few
a Raspberry
Pi using the rubber bands, while three lengths
PyUSB module of screws are used for the moving
in Python. joints. A hex key is supplied for
this purpose, but you need to
avoid overtightening the screws
so that the joints can move freely.
The design is well thought out,
with strategically placed holes for
the servo cables to pass through
55 / $73
to keep them tidy. We found the
magpi.cc/2dLweuN
trickiest part was sliding the arm
70 / $95
into the base, which required right stick controls the upper arm functions (and sample code)
prising the two layers apart; we and claw grip. While the servos for moving the arms servos by
also needed to loosen the base are pre-calibrated to be used out degrees for accurate control.
servo horn slightly to enable it to of the box, we did encounter an Naturally, you can set up loops
move freely. issue with the grip not closing and conditionals to get the arm
The case that houses the fully at first, but this was easily to behave in sophisticated ways.
joysticks also features cut-outs
for the Pis ports, although
theres no easy access to the SD Most of the acrylic pieces
card, so youll need to download
and write the special OS image to
simply slot together, secured
it before you enclose the Pi. Based by a few rubber bands
on Raspbian, the OS includes all
the required software and creates
a wireless access point so that you rectified by unscrewing and Theres even the potential to
can connect to and program the repositioning the servo horn. add a Camera Module to the end
MeArm Pi directly from a remote There is quite a lot of buzzing of the arm (using an extra-long
computer or tablet. This means from the servos, but we found the ribbon cable) and use OpenCV
it can be used headless, without control was accurate enough for for image or face recognition to
the need for a monitor, keyboard, us to pick up small objects, such control it as demonstrated by
and mouse. Theres also the as cherry tomatoes and socks. Mime (magpi.cc/2ffXB2J).
option of connecting it to your A more interesting and
WiFi network if you prefer. educational way to control the Last word
arm is by programming it. While
Twist your arm you can do this directly on the Despite a few teething troubles, we found the
Once the system has booted up, Pi, an easier way to get started MeArm Pi a joy to build and use. Manual control
which takes about 75 seconds is by connecting a PC or tablet using the joysticks is great fun, but programming
on a Pi 3, the arm jerks into life to the MeArm Pis local web it is ultimately more rewarding. The headless
and you can then control it using server, by pointing a browser to setup and local web server make it very easy to
the twin joysticks. This is a lot local.headlesspi.org. This gives get started, offering a choice of four programming
of fun like controlling a mini you access to four apps, each languages, although you could still opt to code it
digger, albeit with a claw. The left for a different programming directly on the Pi instead.
stick handles base rotation and language: Blockly, Snap!, Python,
lower arm movement, and the and JavaScript. These include
14 / $18
Maker
Says
Perfect
for all your
Raspberry
Pi gaming
or robotics
needs
The PiHut
WIRELESS USB
GAME CONTROLLER This versatile controller is easy to set up and great to use
he Raspberry Pi 3 is an All of this is powered by three During a game test, we found
T excellent base for retro
gaming projects. With
AAA batteries, which we find
easier than charging up via a USB
the Wireless USB Game Controller
comfortable to hold and perfectly
its speedy 1.2GHz processor and cable. On the rear of the device fine to use. Its not quite up there
Related
wireless networking, you can set is an on/off switch that is used with the original Dual Shock, but
up a console in your front room to connect and disconnect from its not far off, and better than
andbounce ROMs to it from the Raspberry Pi. most third-party controllers.
USB another computer. The feature we like most You can also use the Wireless
GAMEPAD Retro gaming consoles need a is the 2.4GHz Wireless USB USB Game Controller to control
(SNES-STYLE) controller arcade games are little receiver dongle. Instead of going robots we looked at building a
Not wireless, fun to play with a keyboard and through the awkward Bluetooth Remote Control Robot in The MagPi
but a classic mouse. And if youre building a pairing process, you plug in the issue 51 (magpi.cc/Issue-51).
SNES-style retro games console, this Wireless USB dongle, and it connects
controller
USB Game Controller is a great straight away.
thats perfect
for recreating companion device. We tested it with RetroPie Last word
classic gaming The style will be familiar to Sony and are pleased to report that it
moments. One of the best games
gamers. To our eyes, its based worked first time without any
controllers we've found. Works
on the PlayStation Dual Shock issues. As soon as we booted
right out of the box and is a
from the PlayStation One days. into RetroPie, the Wireless USB
comfortable, professional,
It features a D-pad, four buttons, Game Controller appeared as and slick piece of kit. A perfect
two analogue control sticks, and a device, enabling us to assign companion for retro gaming.
four trigger buttons. In the middle buttons to controls. You will find
6 / $8
are Select, Start, Analog, and a a RetroPie video installation guide
magpi.cc/2ve6iUo
mysterious Turbo button. here:magpi.cc/2doUHrd.
Subscribe from
Magazine
2.29 26.99
rolling subscription
or
full year subscription
25 / $33
Maker
Says
It will
provide you
with hours of
entertainment,
building
projects, and
learning how
to program
MonkMakes
MONKMAKESDUINO
LCD KIT
Have fun programming in a new way with the MonkMakesDuino LCD Kit
hile not specifically a For this kit, its just a different a countdown timer on the LCD.
W Raspberry Pi product
or project, the
way to learn about coding and
using electronics.
Theres a great online repository of
code examples as well, so you dont
MonkMakesDuino LCD Kit is a great Its called the LCD Kit, as the have to type out everything by hand.
educational tool for coding, in a main component it comes with is Thanks to the array of
similar vein to the MonkMakes Pi just that: a simple LCD screen. Its components, this kit will definitely
Related
kits that weve looked at in the past. not a full-colour display, but a two- be useful once youve finished with
In fact, with our feature from issue line text display with 16 characters the instruction book buttons
61 about using the Pi to interact on each line, allowing you to print and LCD screens are useful for
DISPLAY-O- with Arduino, you can probably simple messages such as a live many projects.
TRON HAT connect the two together. temperature reading.
A HAT for the Pi
with a three-line
Unlike the Raspberry Pi, which Being a MonkMakes kit, it also
Last word
is a full computer, Arduino boards comes with much more than the
LCD display that
is fun and easy like the MonkMakesDuino are board and LCD screen. Included A great kit that will teach you
to program. microcontrollers. You write code is a selection of LEDs, buttons, another aspect of coding
on another computer, which you sensors, and jumper wires, along while also having lasting use
then upload to the board for it to with a breadboard, so you can try out beyond the tutorials in the
run. This has various advantages different setups and projects. The book, thanks to its great array
and disadvantages depending quality of the included projects is of electronics components.
on how you use the board (for fantastic, with easy-to-understand
22 / $28
example, a microcontroller uses tutorials on how to create cool
magpi.cc/2y3DM5C
less power, but isnt as powerful). effects with the LEDs, and make
FOR MAKERS
Author: Marc de Vinck putting together the components
Publisher: OReilly of a Stepcraft-2/600 which, with a
Price: 10.50 work area roughly the size
ISBN: 978-1680452860 of an A2 sheet of paper,
Author: Christian Rattat
magpi.cc/2vYxGlP
Publisher: Rocky Nook and a range of attachments,
Price: 22.50 is pretty popular. Readers
A small collection of projects ISBN: 978-1681983028 considering a self-build, or
using easy-to-obtain items magpi.cc/2vYQNvI
purchasing another design,
that combine fun, education,
and a reasonably good chance will still find plenty of
of success even for young Admit it: the thought useful and detailed material
children with non-techy parents.
of owning your own on general CNC machine
milling machine construction, design, and use.
USING C++
Price: 27.99
audience for a beginner-friendly ISBN: 978-1617292583
guide. Long-time coder and teacher magpi.cc/2vZc9cA
Szymon
Dzwonczyk
Occupation: CEO, Kell Ideas Ltd
TURTLE ROVER
INTERVIEW
We talk to the Mars Rover prototype engineers behind
the new Kickstarter rover, powered by Raspberry Pi
reated by the Mars Rover autonomy algorithms, and essentially everything the
C prototype engineers at
Wroclaw University of
even for business, as a robot
carrying special 3D-scanning
operator can see. Justyna is our PR
and marketing manager, showing
Technology, Poland, the Turtle is a or inspection equipment. the world every detail of our work.
robust, waterproof rover that can Aleksander is the mechanical
be used to explore hidden worlds Who is on the team? designer of the robotic arm and
too small or dangerous for humans. We are a team of five who met at other external equipment. Marcin
Wroclaw University of Technology is our software and electronics
Can you tell us about in Poland. Julia is a creative director engineer, and made everything
the Turtle Rover? and a graphic designer. She was to bring life to the rover. I am the
Turtle is an open-source mobile responsible for the rover interface team head and chief mechanical
robot designed to take every maker
payload in a new environment.
The rover is equipped with a full
HD camera, watertight case, and
a robotic arm. As its built around
a Raspberry Pi with Raspbian on
board, you can control it up to
200m away by WiFi with any web-
enabled device (such as tablet,
laptop or phone).
Turtle can be used as a land
drone for cave and urban
exploration, as a development
platform for navigation and
Its easy to control from any internet-connected device
engineer. I built not only the Turtle interests us the most. The rover The only thing with underwater Above The rover
can explore
chassis, but the team as well. itself provides infinite possibilities, use is to remember to keep the awesome places
but its the people who need to tell antenna above the water line. with you
How did the idea come about? you how to write image processing Almost every wireless signal cannot
Weve been involved in Mars rover code or give the rover the brain to go through water. Using the rovers
prototype development since 2015 at drive by itself. Its a lot easier to modular design, you can adapt one
Wroclaw University of Technology. talk to someone else when working of its cases to act as a buoy to keep
Then part of our team worked on on a project rather than keeping the antenna up we plan to cover it
equipment for the joint ESA/DLR/ everything to yourself. in our blog.
SSC BEXUS 21 mission that took our As a team, we always loved
environmental study experiment up the idea of an affordable mini- How long have you been
to the stratosphere. After working computer to fit into our work, working on it?
for science, we decided to establish and here we are. With a five-year know-how
our own company and use our covering similar mobile robots,
experience to design a Mars rover How waterproof is it? Can you we started to work on Turtle at the
for everyday users. From the start, it explore underwater with it? beginning of June 2016. It was a
was supposed to be extremely sturdy The rover is watertight, which year-round struggle to keep the
yet affordable, to show everyone essentially means it can be rover functional, and to be able to
that robotics doesnt need to be submerged underwater, up to three produce it using mostly our internal
expensive to be useful. metres deep. Every motor is sealed resources. We dont outsource the
using rubber components, and assembly, and we produce most of
Why the Raspberry Pi? both the boards and the battery the components using 3D printing,
We used the Pi in the university are enclosed inside watertight CNC machining, and laser cutting.
Mars rover design as well, and cases. Whats more, theres even a This is why we are so eager to
Turtle is designed to fit a Raspberry special compartment to be utilised get as much feedback from both
Pi 3. We are not only looking for by the user. You can add your own our customers and open-source
hardware when designing the electronics to the rover and still DIY builders as possible. As the
robots the community is what keep it watertight. production is super-elastic, we can
provide swift modifications to the
design to fit everyones needs.
GET INVOLVED!
The Turtle Rovers Kickstarter campaign ended a
few days after we went to print, but that doesnt
mean youve missed out! The Turtle Rover is
completely open-source, including the files for the
3D-printed chassis. You can print, build, and code
one yourself, or buy a kit or an assembled robot
from turtlerover.com.
Turtle Rover is watertight,
so it can go almost anywhere
THE MONTH IN
RASPBERRY PI
Everything else that happened this month in the world of Raspberry Pi
THE COMMUNITYS
WEEKEND PROJECTS
Need more inspiration for your weekend projects?
Check out some of these cool projects from our readers
onday is not everyones FRED-209
M favourite day of the week.
However, we like to try to A custom Nerf-firing robo-tank
add a little fun to your morning with that gives you only 20 seconds to
our weekend project roundup on comply. We got a bit of a preview
Twitter. Loads of readers send us the of this last month, and weve been
stuff theyve been working on over excited to see the final product.
the weekend, and we love to see it Learn more about it (and see it in
all! Here are some of our favourites. action!) here: magpi.cc/2xdabaQ.
EMERGENCY TRANSMISSION:
PIONEERS
AUTUMN 2017 CHALLENGE
Its a calamity of epic proportions, and only you can
save us! Time to get your thinking hats on, as you
use tech to #MakeYourIdeas and save us all!
eve received an alarming video message Your team needs to build something to help this
W you can watch it at rpf.io/pioneers. We dont
know this young womans name or exactly
survivor in the treacherous situation shes in. What
you decide to make is completely up to you it
what has happened, but we must help her! If things could be something to help you reach her location,
are as bad as she says they are, our only hope of something to help monitor supplies, a way to warn
survival is to work together. of approaching danger, or anything else you think
would help.
Any tech will do. This is an emergency, so youll
Steps to saving the world need to think creatively with anything you can get
your hands on: laptops, cameras, microcontrollers,
Bring together a TEAM of up to five awesome thinkers Raspberry Pis anything at all. You cant afford
and makers between the ages of 11 and 16, based to be choosy, so youll have to be resourceful with
in the UK or the Republic of Ireland, together with a whatever digital tech you have access to.
mentor aged 18 or over. You need to make sure you record your working
process. Take photos and footage to document how
REGISTER your team at rpf.io/pioneers. you build your make, and put together a video to
present your work when youre done
Brainstorm something to help avert the crisis using making. That way, even if things dont
TECH, and then #MakeYourIdeas by Friday 1 December work out quite as youd hope, youll still
or else it will be too late. be able to show the work you put in and If youre not quite ready
well still want to see it. Even the wonkiest to take part in this Pioneers
Get cool stuff, WIN prizes, and save the world! prototype can be a step on the road to the challenge, head over
tech that saves the world from disaster. to rpf.io/pioneers and click
Get involved to register your
interest in future digital
HELP RASPBERRY PI
CELEBRATE ITS
BIRTHDAY!
The Raspberry Pi Foundation wants to put on a global celebration
for its sixth birthday heres how you can help!
or the last few years, we have held a big Get involved
F Raspberry Pi community event in Cambridge
around Raspberry Pis birthday, where
If youre keen to start a new Jam, theres no need to
wait until March why not get up and running now?
people have come together for a huge party with Then youll be an expert by the time the Raspberry
talks, workshops, and more. We want more people Jam Big Birthday Weekend comes around. Visit
to have the chance to join in with our birthday rpf.io/jam for more information, and submit your
celebrations next year, so were going to be event to the map when youre ready.
coordinating Raspberry Jams all over the world Once your Jam is up and running, register it for
to take place over the Raspberry Jam Big Birthday the birthday party: rpf.io/bdayjamform.
Weekend, 34 March 2018. If you dont fancy organising a Jam for our Big
Birthday Weekend, but would like to celebrate
Big birthday fun with us, keep an eye on our website for an update
Whether youve run a Raspberry Jam before, or early next year. Well publish a full list of Jams
youd like to start a new Jam in your area, we participating in the festivities so you can find one
invite you to join us for our Big Birthday Weekend, near you.
wherever you are in the world. This event will be a
community-led, synchronised, global mega-Jam
in celebration of our sixth birthday and the digital NEED HELP
STARTING A JAM?
making community! Members of the Raspberry Pi
Foundation team will be attending Jams far and wide
to celebrate with you during the weekend.
Jams across the world will receive a special digital
First of all, check out the Raspberry Jam page
pack, and well also be sending out party kits to
to read all about Jams, and take a look at our
registered Jams.
recent blog post explaining the support that we
offer: rpf.io/jam.
If theres no Jam near you yet, the Raspberry Jam
Big Birthday Weekend is the perfect opportunity to
start one yourself! If youd like some help getting
your Jam off the ground, weve produced a free
Raspberry Jam Guidebook full of advice gathered
from the amazing people who run Jams in the UK.
Download it from magpi.cc/2q9DHfQ.
If you have more queries, email
jam@raspberrypi.org.
KICKSTART THIS!
Raspberry Pi projects you can crowdfund this month
AUTOPI NOTAGRAMA
kck.st/2wqOTGe kck.st/2wnR3F1
What if your car had eyes? the AutoPi Kickstarter A pretty cool product that uses machine vision
video asks. Its a car computer powered by Raspberry and a Pi to read sheet music. You can lay out
Pi that offers many enhancements over some of the music using chips or cards of specific notes on
standard tech you find in modern cars. This includes the provided sheet, and it will read and play the
monitoring of your cars performance that you can music. It looks like a fun way to learn how sheet
check online at any time, customisable if-this-then- music works and experiment with how melodies
that events, and dash cams. come together.
PEDAL-PI
magpi.cc/2yaVwvN
MOONHACK 2017:
A NEW WORLD
RECORD!
Kelly Tagalan from Code Club Australia explains how kids
Moonhack
2017
around the world hacked the moon to set a new world record
The Moonhack Date: 15 August 2017
O
n 15 August 2017, Code
Clubs around the globe movement Location: Worldwide
set a world record for the The first Moonhack took place in
largest number of kids coding in Sydney in 2016, where Code Club
a day! From Madrid to Manila and set a record of 10207 kids coding Code Club Canada, France, South
Below Children from Sydney to Seoul, kids in Code in a day. Korea, Bangladesh, and Croatia
coded a special
moon-themed Clubs, homes, and community The response to Moonhack all created translated materials to
project using centres around the world used not just in Australia but around the allow even more kids to take part.
Scratch, Scratch Jr,
or Python code in order to hack the moon. world blew the team away, and
this year they decided to make the Moonhack 2017
challenge as global as possible. From the moment the clock
I want to create anything that struck midnight in New
can benefit the life of one person, Zealand, children had 24 hours
hundreds of people, or maybe even to try coding a specially made
thousands, said one Code Club Moonhack project using Python,
Moonhack participant in Australia. Scratch, or Scratch Jr. Creative
Preparation for the event Moonhackers were encouraged
required a lot of teamwork and to make their own custom
collaboration within the global projects, and there were amazing
Code Club family. The Code Club submissions on a range of themes
New Zealand team helped to create from moon football to heroic
and execute new projects with help dogs saving our natural satellite
from Code Club in the UK, while from alien invaders!
The top five Moonhack countries Sydney to verify the record, and coding and programming. They
submitting projects were we were thrilled to hear that we really enjoyed the challenge!
Australia, New Zealand, the USA, came close to tripling the number Of course, the most important
the UK, and Croatia, but there of kids who took part last year! thing about Moonhack was that
were contributions from so many the kids had fun taking part, and
more amazing places, including Global Moonhacking experienced what it feels like
Syria and Guatemala. The event The founder of Code Club to create with code. One astute
was a truly international Code Bangladesh, Shajan Miah, nine-year-old said: What I
Club collaboration! summed up the spirit of the day love about coding is that you can
create your own games. Coding is
FIND OUT
MORE
If you would like to be part of Moonhack 2018,
make sure you sign up at moonhack.com for
alerts and news.
If youre interested in volunteering at a Code
Club, head to codeclubworld.org to find out
more. There, youll find information on starting
a new club anywhere in the world.
Kids got to work coding at Moonhack HQ
COMMUNITY
PROFILE
CAT
LAMIN
Certified Educator, Jam Maker, Teacher,
Outreach Champion and much, much more...
Cat Lamin
Lamin has become a regular face role of Head of ICT. One of the
within the Raspberry Pi community children at my school told his mum
and for good reason. that Miss Lamin makes being
Category: Raspberry Pi geeky cool, which was kinda cool,
Certified Educator Into the classroom she reveals.
With a BA in English from the Moving on from teaching,
Day job: Education outreach
University of Birmingham, although she still dedicates a few
Website: twitter.com/CatLamin there was no question as to the hours every fortnight to a local
catlamin.com profession Cat saw herself working school, Cat now works in the
in. Ive known I wanted to be a computer science community,
primary school teacher since I was offering her services across a
about nine, she admits, going multitude of platforms and events.
on to explain how her A-level I get to teach in a school local to
choices in Maths, Further Maths me for an afternoon every other
and English helped to keep her on week, so Ive just been teaching Year
Below Ever the
avid geek girl, track, completing her education 6 about interactive fiction, and cant
Cat also dedicates
with a PGCE at the University wait to bring in some Raspberry Pis
time to hacking
and digital making of Plymouth. for them to play with.
HIGHLIGHTS
magpi.cc/2xbzGsZ
PICADEMY
As well as being a Raspberry Pi Certified Educator (RCE),
Cat has helped to facilitate a few Picademy events, with
her third happening this October in Cardiff. Cat is one
Championing education Above As part of her role with pi-top, Cat
was recently sent to Argentina to talk to
of the many RCEs to agree that Picademy has had a
For pi-top, creators of Raspberry the Ministry of Education massive impact on her life.
Pi-based learning tools, Cat
works as an Education Outreach Evenings for teachers, offering
Champion, running workshops a relaxed introduction into the
and helping to grow the user world of computer science, and
community. Through pi-top co-hosting Wimbledon Jam with
shes attended educational shows Albert Hickey. Occasionally,
such as Bett, given talks at the she adds, Ive been known to
Raspberry Pi Birthday Bash, and organise something called a
presented to the Argentinian #geekeat, which is just a meal in
Ministry of Education. The other central London or in Cambridge
thing I do at pi-top is talk to the where anyone who is part of the
developers about their ideas for Raspberry Pi community can meet
magpi.cc/2xc2tO8
MAPLE BEAR
CANADIAN SCHOOLS
Shes continued to add to Having previously provided training aids for the
EVENT CALENDAR
Roeselare, Belgium
HUPIJAM
1 Harrisburg,
PA, USA
WESTSIDE
4 RASPBERRY JAM
2 RASPBERRY PI
Pearland, TX, USA JAM ISTANBUL
Istanbul, Turkey
FIND OUT
ABOUT JAMS
Want a Raspberry Jam in
8 MELBOURNE PI
USER GROUP
Warranwood, VIC,
your area? Want to start one? Australia
Email Ben Nuttall about it:
ben@raspberrypi.org
5 RASPBERRY JAM
@ PI TOWERS
Cambridge, UK
7 16TH EGHAM
RASPBERRY JAM
Staines-upon-Thames, UK
16TH EGHAM
RASPBERRY JAM RASPBERRY JAM ADVICE
When: Sunday 15 October
Where: The Glanty,
Staines-upon-Thames, UK
magpi.cc/2x8qXaT
SAFETY
This month is Halloween themed, Our venue, a university, required us to perform
so come along and make some a risk assessment and have public liability
spooktacular Pi projects! insurance. I had experience with risk assessments
from work, so that was straightforward, but
MELBOURNE PI USER GROUP anyone who doesnt have that experience can
When: Tuesday 17 October find plenty of examples online.
Where: Melbourne Rudolf Steiner Andrew Oakley
School, Warranwood, Cotswold Jam
VIC, Australia
mpug.clarkson.id.au Every Raspberry Jam is entitled to apply for a
The groups aim is to bring like- Jam starter kit, which includes magazines, printed
minded people together to talk about worksheets, stickers, flyers and more. Download the
how theyre using the Raspberry Pi. Raspberry Jam Guidebook at magpi.cc/2q9DHfQ.
YOUR LETTERS
See my project
I have a fun Raspberry Pi project that Ive made! How do I go
about showing it to you? Will I be able to put it in the magazine?
Alex D
We love seeing what youve made with the Raspberry Pi! Send us
your projects via email (magpi@raspberrypi.org) or on Twitter
(@TheMagP1). As for getting it into the magazine, it largely
depends on what you send us, but there are many ways for us to
feature cool projects in The MagPi.
Above The worlds thinnest Raspberry Pi 3. Image credit: Pimoroni
A minimalist Raspberry Pi
x86 Stretch Im aware youre not able to get a kit to build a
I upgraded my Raspberry Pi to the new version of Raspberry Pi; however, it would be quite useful
Raspbian Stretch and really liked it. Ive managed for me right now! Id like to have something as
to misplace the disc with the PC version of the powerful as the Raspberry Pi 3 and as slim as the
Raspberry Pi Desktop, and I was wondering if the Pi Zero, or even slimmer.
version on there used Stretch or if it was still Jessie? I was thinking about the Compute Module 3,
Either way, is there a place I can go to download but I was wondering if there was a way to get a
the ISO, as Ive misplaced the disc? Thanks. bare Raspberry Pi 3 board? Is it safe to take apart a
Sarah commercial Raspberry Pi 3? I have a couple of spare
ones laying around.
The version of the Raspberry Pi Desktop for x86 PCs Derek
that came with issue 60 was based on Debian Jessie
rather than Stretch, and has not been updated since Great timing with this question! Pimoroni has just
the release of Raspberry Pi Desktop on Raspbian released a video on how to slim down a Raspberry Pi 3
Stretch. We can point you to the ISO, as its available by desoldering all the ports and pins except the micro
now on the Raspberry Pi OS download page at USB power port. You can find more information here:
rpf.io/x86. magpi.cc/2xco4WD.
If you need a guide to installing it on your PC, we As for buying one, we dont know of anywhere
have a new instructional video on how to do this, that will sell you a plain board, so your best bet is to
which you can find at magpi.cc/2xbvyJG. follow Pimoronis instructions with one of your spare
Raspberry Pi 3s!
PRINTED
Camera Module Essentials book
is due out as a printed version?
Andrew
ESSENTIALS
As weve done in the past, once weve
completed a new series of Essentials books,
well do a print run and theyll be available
in our store, and from Amazon and other
The Raspberry Pi Forum is a hotbed suppliers. We cant say yet when that will
of conversations and problem-solving be, as even we dont know quite yet. We
for the community. can assure you theyre coming, though.
Join in via raspberrypi.org/forums If you cant wait until then, you can
always print out a copy of the Camera
Module Guide using the PDF. As its licensed
WRITE TO US under Creative Commons, we let you
do that you could even go to a proper
Have you got something youd like to say? Above The Camera
Get in touch via magpi@raspberrypi.org or on The MagPi printer and get a nice glossy version Module Guide covers
everything you need to
section of the forum at: raspberrypi.org/forums for yourself! Grab the PDF from here:
know to get started with
magpi.cc/2ufdjnT. the Camera Module
GOPIGO3
ROBOT KITS
Weve got two GoPiGo3 Beginner
Starter Kits up for grabs, thanks
to our friends at Dexter Industries
(dexterindustries.com).
The GoPiGo3 is one of the best robots
weve ever seen. Its packed with advanced
features, including encoders that provide
precision movement. Two lucky winners will
get a maxed-out GoPiGo3 kit and accessories:
CREATING
TO LEARN
In Matt Richardsons experience, creating projects leads
to the most efficient learning
was a graduate school student in New York Jakes tweet perfectly sums up what I learnt first-
I City in 2012 when the extremely destructive
hurricane Sandy made landfall on the North
hand while toiling away to create a physical volume
of hundreds of email messages. Having a particular
Atlantic coast of the United States. Our student email project in mind when you use any technology (and
group was especially active at that time. Classes were not just Python) is the best way to learn it. Creating
cancelled and students were checking in as safe, something new provides a clear objective, and
reporting problems, and helping each other out. The you get more out than you put into it. You bring
email threads told a story about what was going on at something new into the world, and you learn a lot
the time, and so I wanted to capture and present that along the way.
story outside the context of email. I wanted to take the
story told by the emails and put it into my own single- Real objectives
edition physical book. Having a clear objective for what you want to achieve
gives you more drive to learn. I believe that this is
Python project one of the reasons why project-based learning is
To accomplish that, I spent a full weekend figuring out such an effective methodology. Youre not learning
how to get Python to read emails from my account, only for the sake of learning. Learning by creating
process them, and create a PDF to send to the printer for something gives you the opportunity to apply
publishing. It started off as a simple enough idea, but what you learn, and gives you the determination
the complexity began to reveal itself as I worked on the to get it done. Theres more satisfaction in creating
project. How do I number the pages? How do I split up something you wanted to make than there is in
the chapters? How do I create a table of contents? How solving a hypothetical problem.
do I solve the problem of odd characters in the emails When youre creating with technology, youre
that were wreaking havoc with my Python script? not only learning about that technology, but also
During that weekend of figuring out how to turn email developing some of your soft skills. Rarely does
messages into a printed book, I probably learned more a project come to fruition without a little bit of a
about Python than I have at any other time in my life. struggle. Creating projects often takes patience,
persistence, and grit. These are characteristics that
Creative learning you wont learn in a textbook or from a lecture.
Just a few days ago I was reminded of this experience After a lot of persistence getting my Python script
when I came across a great piece of advice on Twitter just right, I sent the file to be printed as a bound
from Seattle-based data scientist Jake VanderPlas volume of emails. When I received it in the mail the
(@jakevdp). He tweeted, My advice on learning following week, I was so pleased with how the project
Python: Dont set out to learn Python. Choose a turned out. The source of much of that satisfaction
problem youre interested in and learn to solve it was how much I learnt in order to achieve that goal.
with Python. I didnt just learn to create. I created to learn.
ESSENTIALS
LEARN | CODE | MAKE