MagPi139-Raspberry Pi Magazine March 2024

Download as pdf or txt
Download as pdf or txt
You are on page 1of 100

YOUR OFFICIAL RASPBERRY PI MAGAZINE

Issue 139 March 2024 magpi.cc The official Raspberry Pi magazine

TROUBLESHOOTING
GUIDE
Fix your Raspberry Pi today!

£5.99

UPCYCLE OLD SONOS SYSTEMS WITH RASPBERRY PI


Industrial Raspberry Pi

ComfilePi
WELCOME

WELCOME
to The MagPi 139

R
aspberry Pi puts you at the forefront of computer
experimentation. It’s an exciting place to be, albeit a tad
precocious. That’s why our Troubleshooting feature
(page 42) is such a vital read. It’s packed with information on
how to overcome any snags you might encounter. Not only will Lucy

EDITOR
this make your Raspberry Pi experience more enjoyable, but Hattersley-
Haworth
you’ll also become a better computer expert.
Lucy is editor of
This month sees the welcome return of #MonthOfMaking The MagPi and has
spent a lot of time
(page 68), where we all get together to show off the big extolling the virtues of
builds we’ve been working on. the Sega Dreamcast
this month.
We’ve also got two cases that support the new PCIe drives: magpi.cc
NVME Base (page 76) and Argon ONE V3 M.2 (page 78). Both
will vastly speed up your Raspberry Pi 5.
Whatever you make with Raspberry Pi, be sure to share it with
the community. We learn from each other and love seeing what
everyone creates.
GET A
Lucy Hattersley-Haworth
RASPBERRY PI
PICO W
Editor
PAGE 36

magpi.cc
magpi.cc03 03
CONTENTS

Contents
> Issue 139 > March 2024

Cover Feature

42 Troubleshooting 42
Guide
Regulars

08 World of Raspberry Pi
38 Case Study: Velo AI
92 Your Letters
94 Community events calendar
97 Next Month
98 The Final Word

Project Showcases
12 FREISA
16 Mac Mini KVMac16 32
20 PeggyBoard
24 YAFC Flux Capacitor
28 THEA500 Mini keyboard
30 3D Laser Radar
32 SNES XL
34 PicoZX Handheld

20

PeggyBoard SNES XL

The MagPi is published monthly by Raspberry Pi Ltd, 194 Cambridge Science Park, Milton Road, Cambridge, England, CB4 0AB. Publishers
Service Associates, 2406 Reach Road, Williamsport, PA, 17701, is the mailing agent for copies distributed in the US and Canada. Application to
mail at Periodicals prices is pending at Williamsport, PA. POSTMASTER: Send address changes to The MagPi, c/o Publishers Service Associates,
2406 Reach Road, Williamsport, PA, 17701.

magpi.cc 05
CONTENTS

Tutorials 50 62
50 Get to know your Raspberry Pi
58 Twin lens reflex camera
62 Upcycle Sonos speakers – part 1
66 Connect cameras and displays

Get to know your Raspberry Pi Upcycle Sonos speakers - part 1


The Big Feature

68 76

#MonthOfMaking 2024
NVME Base

Reviews
84
76 NVMe Base
78 Argon ONE V3 M.2 NVMe
80 ED-HMI3020
82 10 amazing Raspberry
Pi 5 accessories
84 Learn AI

Community

86 Interview: Tim Stenning


88 This Month in Raspberry Pi Learn AI

WIN ARGON ONE V3 CASES 96

1 OF 5
DISCLAIMER: Some of the tools and techniques shown in The MagPi magazine are dangerous unless used with skill, experience, and appropriate personal protection equipment. While
we attempt to guide the reader, ultimately you are responsible for your own safety and understanding the limits of yourself and your equipment. Children should be supervised. Raspberry
Pi Ltd does not accept responsibility for any injuries, damage to equipment, or costs incurred from projects, tutorials or suggestions in The MagPi magazine. Laws and regulations covering
many of the topics in The MagPi magazine are different between countries, and are always subject to change. You are responsible for understanding the requirements in your jurisdiction
and ensuring that you comply with them. Some manufacturers place limits on the use of their hardware which some projects or suggestions in The MagPi magazine may go beyond. It is
your responsibility to understand the manufacturer’s limits.

06 magpi.cc
Design

Code

Configure

Analyze

PR O FES S I O N A L CO N T R O L SYS T E M D E V E LO PM E N T TOO L

Home projects made easy.


CDP Studio, a great software development tool for your home projects. Build
systems for Raspberry Pi, use C++ or NoCode programming, open source libraries,
out of the box support for GPIO, I2C, MQTT, OPC UA and more. Create beautiful user
interfaces. Built for industrial control system development, FREE for home projects.

cdpstudio.com
Tel: +47 990 80 900 • [email protected]
CDP Technologies AS // Hundsværgata 8, 6008 Ålesund, Norway
THE WORLD OF RASPBERRY PI

TensorFlow Lite
speed bost
A big bang update for TensorFlow Lite
for Microcontrollers. By Alasdair Allan

T he excitement around machine learning right


now is all about generative AI, and the new
generation of large language models (LLMs).
But sometimes you should take a step back, and
remember what we were all excited about last time.
hardware, but your overall hardware cost is that
much lower.
But what if you want to go really tiny –
microcontroller tiny? We have actually seen some
really crazy projects (magpi.cc/picomonocam)
Because it could be time to get excited about it again. making use of our RP2040 chip, Raspberry
Before LLMs made it big, we were all excited Pi Pico, and the RP2040 port of TensorFlow
by embedded machine learning – what’s called Lite for Microcontrollers (magpi.cc/tflmicro).
TinyML – and Raspberry Pi is probably the most Unfortunately, since that port was done by
affordable way to get started. The inferencing Pete Warden, who at that point headed up the
performance (magpi.cc/bigbenchmarking) we TensorFlow mobile team at Google, the RP2040
see with Raspberry Pi 4 was comparable to or port has been languishing. But a couple of weeks
better than some of the new accelerator ago, that all changed (magpi.cc/tflmicropull12).

If you’re thinking about doing some


tiny machine learning, RP2040 just
became your go-to platform

X A Raspberry Pi Pico W
board ready for
machine learning

08 magpi.cc TensorFlow Lite speed boost


THE WORLD OF RASPBERRY PI

T RP2040 is the microcontroller at the heart of Raspberry Pi Pico

A pull request the size of Wales optimisations to depthwise convolutions. For


Now at Useful Sensors (usefulsensors.com), the first time, we have dual-core support for
Pete has been doing some interesting things TensorFlow on RP2040! If you’re interested in
(magpi.cc/tinycodereader) with RP2040. He has some of the detail behind the updates, Pete has
just upstreamed the last three years of changes put together a fascinating write-up (magpi.cc/
– after all, as he puts it, “We all love pull requests picomemorylayout) of the memory layout issues
with 1,129 changed files, right?” – and he’s taking he ran into while debugging the optimisations.
on maintenance of the port on a best-effort basis. The upshot? These updates and changes reduce
the time for the person detection benchmark
Dual-core support on RP2040 (magpi.cc/persondetection) code from 824ms
But there’s more: beyond that, Pete has updated to 588ms. That’s a ×1.4 speed increase!
the port, speeding up the default CMSIS-NN If you’re thinking about doing some tiny
implementation for Conv2D by splitting it across machine learning, RP2040 just became your
both cores on the RP2040, and adding dual-core go-to platform (magpi.cc/tflmicro).

TensorFlow Lite speed boost magpi.cc 09


THE WORLD OF RASPBERRY PI

GitHub Universe
attendees treated
to custom
RP2040 Badgers
Raspberry Pi RP2040 was used to create custom badges
for GitHub Universe attendees. By Ashley Whittaker

W e move in the kind of circles where


news of the GitHub Universe
(githubuniverse.com) conference lights
up our social feeds each year. This time (well, now
it’s last time) we were super excited to see photos
Special custom gift
GitHub’s Martin Woodward made a dedicated repo
(magpi.cc/badger2040git) to help conference
attendees learn how to hack their badges. Lo
and behold, in it he confirms that the hackable
of the official conference badges. We noticed conference badges are indeed a custom version
T The custom they look a lot like a Pimoroni Badger, which is of the Badger 2040 (magpi.cc/badgerguide) that
Badger2040 kit
handed out to GitHub
powered by our RP2040 chip (magpi.cc/rp2040), Pimoroni made especially for GitHub.
Universe attendees so we took a closer look to see if we were right.

GitHub Universe Badger is


electronically identical to
the original Badger 2040
An RP2040 is running MicroPython which
throws text up on a built-in 2.9-inch E Ink
display. All five buttons dotted around the edge of
the screen are user-configurable, and there’s also
a Stemma QT expansion port so you can connect
your own accessories, such as sensors. You can
power the badge via its USB-C port, or use either
a 2 × AAA battery pack or a standard 3.7V LiPo
cell. It’s “extremely low power”, according to
Martin, which is what you need when you’re
wandering around a conference all day and don’t
want to be tied to a power outlet.

10 magpi.cc GitHub Universe attendees treated to custom RP2040 Badgers


THE WORLD OF RASPBERRY PI

Open source ideas


Custom PCB aside, the GitHub Universe Badger
is electronically identical to the original Badger
2040. This means conference attendees can make
use of all the open-source examples already out
there, as people have shared cool things they’ve
done with their Badger – the devices aren’t tied to
a one-time use as a conference badge. Pre-loaded
goodies on the GitHub Universe Badger include an
eBook reader, to-do list, and image viewer.

Want cool badges for your event?


Martin’s GitHub repo pointed us towards Badge.
team (badge.team), an open-source community
for people who want to create excellent badges
for events. There are some magical designs on
display in the gallery already. They’re also looking
for volunteers to support the project, so join their
Telegram group (magpi.cc/badgetele) or Discord
channel (magpi.cc/badgedisc) if you think you can
help people make next-level event badges.

S A custom Badger
2040 badge
handed out at
GitHub Universe

W The PCB is a custom-


built conference
badge running
Micropython
on the RP2040
microcontroller

GitHub Universe attendees treated to custom RP2040 Badgers magpi.cc 11


PROJECT SHOWCASE

FREISA
Every dog has its day and this is FREISA’s time to shine.
David Crookes takes a look at an innovative plant-watering system

R eal dogs tend to be fluffy and cute.


Robodogs rather less so. But when you meet
FREISA, a robotic dog created for a recent
competition, you’ll still want to give it a pat on
the back and heap it with praise. For, just like
Re-tail therapy
The Mini Pupper 2 is an open source robot kit that
sprang into life off the back of a crowdfunding
campaign. The quadrupedal robot supports Raspberry
Pi, which the team planned to use to handle FREISA’s
its living, breathing canine counterparts, this navigation. To ensure it would be suitable as a
impressive little thing is intelligent and skilled. robot plant waterer, an OAK-D Lite camera boasting
It’s capable of spotting a thirsty plant and making SpatialAI functionality was connected. This camera
B-AROL-O
MAKER

sure it gets enough water. can run computer vision pipelines on dedicated
Team FREISA – an acronym for Four-legged Robot hardware which, the team surmised, would reduce
The talented Ensuring Intelligent Sprinkler Automation – is the the burden on Raspberry Pi’s resources.
international team brainchild of the B-AROL-O Team. This group won To ensure the project would actually be suitable
consists of Gianluca
the popular vote of the OpenCV Spatial AI Contest in for its intended purpose, the team carried out
Tetri, Gianpaolo
Macario, Pietro 2022 by creating a packaging machine called ARNEIS some research. “We conducted interviews with
d’Agostino, Davide using Raspberry Pi 4B, a Spatial AI camera and an several experienced farmers and gardeners,” says
Macario, Andrea assortment of LEGO Technic parts. Gianluca. “Their insights suggested that visually
Podo and Orso Eric
Seeking to make a similar impact in last year’s inspecting plants can offer a reliable assessment
magpi.cc/freisa competition, they got their heads together once of their condition.”
again. “As implied by our team name, our familiarity
with vineyards inspired us to develop an automated
watering system aimed at assisting on a farm,” says The team got to work,
one of the group, Gianluca Teti. The idea was to use
computer vision to water plants and come up with a training two neural
device capable of carrying out the work.
They ruled out creating a robot running on networks
wheels and tracks, noting that it would be poor at
clearing obstacles over rough ground. The group With this in mind, the team got to work, training
also briefly considered a quadcopter but felt its two neural networks to work out which plants
battery and payload would be poor. A quadruped would need watering and which ones would not. By
legged platform was chosen because of its ability to this point, they had ditched the idea of analysing
navigate complex terrain. vines because they noted the leaves would grow too
“We initiated a brainstorming session with the high for the robot to see them, and the vineyard
team to assess our available hardware options terrain would be too uneven. Instead, they decided
for the project,” Gianluca adds. “Orso Eric, one to concentrate their efforts on a household garden
of our team members, owned a Mini Pupper 2. populated with tomato plants.
Consequently, we collectively agreed to utilise that “The objective was to assess a plant’s condition by
specific model for our project.” analysing the state of its leaves and stems,” Gianluca

12 magpi.cc FREISA
PROJECT SHOWCASE

The project’s Raspberry Pi 4


The OAK-D Lite 12.3 MP Model B controls the motion of
camera contains an AI the robot and the mechanical
processing chip and features sprinkler so that the targets
300,000-point stereo depth can be watered

Rather than create a robot


dog from scratch, the
project has been based
on the open-source Mini
Pupper 2 which supports
the Robot Operating System
and Raspberry Pi

Quick FACTS
> It’s built around
a Mini Pupper 2
robot frame

> It runs Ubuntu,


Docker and OpenCV

> An OAK-D Lite


camera captures
and processes
the images

> It can detect


unhealthy leaves
on tomato plants

> There’s a water


sprinkler system
on board

S The Mini Pupper 2 comes in kit form, so one of the first tasks was to assemble all of the parts.

FREISA magpi.cc 13
PROJECT SHOWCASE

these supplementary sensors.”


By using Ubuntu rather than Raspberry Pi OS,
the team says their work was made a little easier.
“Our decision leaned towards an Ubuntu server
over Raspberry Pi OS, despite their potential
equivalence for our current application, because
Ubuntu stands as the primary supported platform
for ROS (Robot Operating System), a framework
we intend to implement soon to expand the
capabilities of our platform for additional use
cases,” Gianluca explains.
Having Raspberry Pi on board, however, has
worked extremely well. “Raspberry Pi serves as
S The Mini Pupper 2 starts to take shape, allowing the team to an exceptional hardware foundation, notably due
begin work on their watering project
to its extensive array of open-source software
and programming tools,” Gianluca continues.
explains. “Our approach began with collecting “Furthermore, the Mini Pupper 2 is constructed
a vast array of images and then training various using the Raspberry Pi Compute Module 4, aiding
networks and models. Our infrastructure consisted in space and weight reduction, consequently
of one desktop computer – featuring an AMD Ryzen enhancing the available payload on the robot dog.”
2600X CPU, 48 GB of RAM, and an NVidia GTX 1660
Super GPU – running Ubuntu 23.04 and accessible Round of a-paws
remotely via a JupyterLab container.” The great news is that the project – which
makes use of Docker (a software platform that
Petting on success lets developers quickly build, test and deploy
For the time being, the team decided that using applications) and OpenCV – has been effective.
visuals would be sufficient, although there is The robot has a sprinkler in a pelvic position with
scope to further improve accuracy. “Integrating the water reservoir above it, and it’s able to move
additional sensors – such as those measuring freely to quench a plant’s thirst.
humidity, temperature and so on – into the FREISA “Our robot demonstrates good abilities in
project’s framework could be beneficial,” Gianluca identifying a target plant, navigating towards it,
says. “The architecture of the FREISA project and examining its leaves before precisely adjusting
appears adaptable enough to readily accommodate its position to efficiently water the plant,” Gianluca

X The Mini Pupper 2


also has support
for Raspberry Pi
Compute Module 4

14 magpi.cc FREISA
PROJECT SHOWCASE

explains. Even so, there have been challenges;


some practical and some logistical. “The primary Watering the plants
hurdle we encountered was identifying the
most suitable terrain for deploying the watering
system,” he continues.
“A secondary challenge involved effectively
coordinating tasks among a team comprising

FREISA won the Grand


Prize in 2023’s OpenCV AI
Competition FREISA utilises its camera and a machine
01 learning algorithm trained using Roboflow
four active members and two advisors situated (roboflow.com) to tell the robot’s navigation system
across various locations worldwide: the US, where the plants are located. It will analyse the state of
France and Italy. the leaves and work out which plants require watering.
“To overcome these challenges, we implemented
an agile development workflow based on weekly
sprints. With the help of a CI/CD pipeline built with
GitHub and other online resources, team members
collaborated effectively, enabling successful
project management and task allocation despite
geographical distances.”
FREISA won the Grand Prize in 2023’s OpenCV
AI Competition. Still, the team isn’t going to rest
on its laurels. It’s already identified potential T When creating the
improvements such as using the OAK-D Lite’s water and targeting
systems, the team
stereo camera to estimate a target’s distance. Just needed to consider
goes to show, you can’t keep a good dog down. weight distribution

If it identifies dried-up plants, the robot will


02 then ready itself. It will use its legs to get into
position so that the robot’s pelvic-located 3D-printed
water sprinkling system (which includes a reservoir)
is able to best target the thirsty plant.

At this stage, the sprinkling system bursts into


03 action thanks to servomotors and a syringe
that is able to draw up 10ml of water. The water is
then dispensed on to the plant, and this is confirmed
to the plant’s owner, keeping a log of the event.

FREISA magpi.cc 15
PROJECT SHOWCASE

Mac Mini
KVMac16
Fixing Macs remotely with Raspberry Pi. By Rosie Hattersley

S elf-confessed “hardware hacker” Ivan


Kuleshov really likes making things. He’s
adept at using tools covering everything
from microscopes to lathes, builds and flies drones
and has won three separate hackathons. As long
For the Mac Mini KVMac16 project – Ivan
describes it as “a console for 16 Mac minis on
a shelf that occupies a 6U space in a server
rack” – Raspberry Pi is used as a KVM (kernel-
based virtual machine) while “the PiKVM HAT
as he can remember, he’s been beavering away is used for video capture and keyboard/mouse
on various projects related to hardware, from PC command transfer”. Ivan chose Raspberry
Ivan modding to the creation of homemade devices, Pi because it both supports the components
MAKER

Kuleshov racking up more than nine years on 3D printing and offers long-term software support. He
and modelling. This aspect briefly became a says: “Raspberry Pi 4 with 4GB is easily
Ivan loves taking business venture, but his day job is as a systems sufficient for the task”.
apart different
devices to improve engineer in Munich with a string of certifications.
them, or learn how His computing, coding and design skills also came
they work, and
can’t resist a
in handy for his Mac Mini KVMac16 project, for Ivan chose Raspberry
which the goal was simple: to provide full access
hardware challenge.
to a Mac mini in a remote data centre, with a bit of Pi because it both
magpi.cc/
uptimelab help from Raspberry Pi 4.
supports the components
The right tools and offers long-term
Ivan values Raspberry P’s modularity which
allows him to create unique devices and has
previously used various models including
software support
Compute Module 4 in his Compute Blade
(magpi.cc/computeblade), an energy-efficient As Ivan’s blog explains, should a Mac go down
alternative to a rack-mounted server. He praises due to a failed update or any another reason, the
the “relatively cheap minicomputer with a huge only way to reboot it is to physically press its
community, which greatly lowers the threshold of power button. This is not something that can be
entry and increases trust”. done remotely, and is the issue his KVMac device

16 magpi.cc Mac Mini KVMac16


PROJECT SHOWCASE

KVMac16 helps get an offline Mac mini


back up and running should an update or
other issue cause it to be out of action

Quick FACTS
> The Mac Mini
KVMac16
project cost just
under €2,000
Ivan designed and
3D printed the Mac > It involved
mini server rack too! two weeks of
3D printing

> And around


a year of
development

> Alongside Ivan’s


many other
hardware projects

A Servo HAT administered > He’s thinking of a


through PiKVM’s user potential desktop
interface, and managed by version in future
Raspberry Pi 4, physically
pushes the power button
to restart Mac mini and
bring it back online

X Ivan’s “perfect shelf’ for


his Mac mini project
allows air to circulate
while being very robust

Mac Mini KVMac16 magpi.cc 17


PROJECT SHOWCASE

T Ivan designed his


own stand for the
16-strong Mac
mini server setup

Third time’s a dream


As Ivan details on his Uplab blog (magpi.cc/
kvmrackstand), creating the KVM Mac Mini
project involved three different versions, with
improvements each time focusing on ease of
installation and overall reliability. PiKVM is at
the heart of the project, and provides a basic
user interface, “but the ability to physically push
buttons, and the 16 Mac mini install stand itself,
are designed by me from scratch [as were the]
custom scripts and UI modifications to give the
user full control”.
Many of the challenges were because the project
uses servos and levers to push buttons on the
Mac minis, which need to work with maximum
reliability. He started the project from scratch
three times and counsels other would-be makers
that if you find your project moving in the wrong
addresses. “To provide full control, with the ability direction, stop, reappraise and “have the strength
to completely reinstall the OS, you need to press to start over from scratch”. Ivan did this twice
the power button and there are no other options.” here, and says it strengthened his project as well
Ivan has created the optimal workaround: a Servo as validating the potential for both a four-Mac
HAT and self-written Python scripts control the mini model and a potential CI/CD one (Continuous
servos used to physically push buttons on the Mac Integration Continuous Deployment).
mini. He also uses RS232 to control a regular KVM It is just as well that Raspberry Pi proved a good
switch from the user interface between a Raspberry option. Ivan says there are “simply no alternatives.
Pi PiKVM HAT and 16 Mac minis, through which he This project was only possible thanks to Raspberry
can connect to any of them. Pi and PiKVM.

18 magpi.cc Mac Mini KVMac16


PROJECT SHOWCASE

Back to Mac

T The PiKVM 3 virtual


machine provides a custom
interface through which
Ivan controls his Mac minis

Remotely troubleshooting a Mac mini is


01 hampered by the need to restart it via
its power button. Ivan’s PiKVM HAT provides a
technological solution.

PiKVM and a Servo HAT enable Ivan to


02 remotely restart the failed Mac mini for
troubleshooting. Raspberry Pi 4 controls the
servo that presses the button.

One servo is used for every two Mac


03 minis, keeping weight and cost minimal.

Mac Mini KVMac16 magpi.cc 19


PROJECT SHOWCASE

PeggyBoard
Climbing walls are already pretty exhilarating but
that didn’t stop one maker from upgrading his with
a Raspberry Pi. Rob Zwetsloot gets to grips with it.

D uring the various lockdowns at the start of


COVID, people picked up various hobbies.
Baking sourdough bread, setting up a new
island in Animal Crossing, and getting some home
exercise. Instead of deadlifts and HIIT, however,
This is not a new idea – in fact Pegor mentions
a pre-existing product called MoonBoard which
he drew inspiration from – however making it
becomes part of the fun. Also, it’s significantly
cheaper too.
one maker helped a friend out with a special piece
of equipment.
Pegor “[It’s] called the PeggyBoard,” Pegor The LEDs all light up
MAKER

Karoglanian Karoglanian tells us about his creation. “It’s an


interactive climbing wall powered by a Raspberry properly, the web app is
easy to use… and the
An embedded Pi that allows the user to set specified routes
software engineer
who likes to take on using a web app which also allows them to save
a variety of projects
in his downtime. His
routes or load old ones. It was originally developed
when the COVID-19 pandemic first started and the
database is very useful to
goal is to get others
excited to make
local climbing gym had to shut its doors to follow go back to saved climbs
something. quarantine protocols. My friend Liam reached out
to me and wanted to make a woody [a climbing
github.com/
PegorK wall used for training] and asked if I could design
something to make it interactive.”

Warning!
Build & Climb
Safely
If you plan to recreate this
project, it should only be
attempted by people well
versed in building (and
climbing safety)

magpi.cc/powertools

X Select your route


on your phone to
activate it on the
wall. The web app
remembers past
routes and lets you
create custom ones

20 magpi.cc Peggy Board


PROJECT SHOWCASE

Quick FACTS
> The wall uses 400
addressable LEDs

> A Raspberry Pi with


onboard Wi-Fi is
recommended

> Artificial climbing


walls have been
around for nearly
90 years

> The 2020 Olympics


were the first to
have climbing as an
event...

> …with the ‘sport’ of


climbing having
only originated in
the mid-1980s

The base is a custom


built climbing wall
in a garage

A web app lets you choose a route on


an internet connected Raspberry Pi,
which then lights up the correct LEDs

Peggy Board magpi.cc 21


PROJECT SHOWCASE

T The LED grid is


also painted onto
the wall so you
know what holds
you’re selecting

LED walls
Building a high-tech climbing wall might seem
daunting, but breaking it down into three parts
makes it seem a little less intimidating.
“The first being the building of the physical
climbing wall which involved some framing and
reinforcing the garage roof,” explains Pegor. “The
second was putting together the control panel
which housed the Raspberry Pi, touchscreen, power
supply, and level shifter. The last part was writing
the code to make the whole thing interactive and
functional. It’s mostly written in JavaScript, PHP,
shell scripts, HTML, CSS, and Python.”
Reinforcing a roof still seems like a bit of a tricky
process, but he makes it sound simple when it’s
broken down that way. It seems to have done the
trick though.
“It works great,” Pegor says. “The LEDs all
light up properly, the web app is easy to use
–outside of the occasional fat finger on the wrong
hold – and the database is very useful to go back
to saved climbs. The only issue we ran into was
the occasional Wi-Fi connection drop, but that
was due to router issues and the distance of the
control panel.”

S A new addition is a touchscreen control so you don’t always


need the webapp

22 magpi.cc Peggy Board


PROJECT SHOWCASE

Custom climb

Building a frame for a climbing wall is serious


01 business. It needs to be sturdy enough to
support itself and a person – in this case the ceiling
and roof had to be reinforced.

Adding electronics means a lot of LEDs in this


02 case – which you’ll need to power and address
specifically to illuminate the chosen route

Wall of the future S A climbing wall should


look like one, including the
It’s a very interesting setup which would likely lead art you’d commonly see in
a climbing gym
to good data collection about your climbs – great
for people wanting to improve times, or see any
mistakes they hadn’t noticed. For now, though,
this particular wall is largely complete.
“The touchscreen addition was the latest
upgrade,” Pegor tells us. “It didn’t originally
have one, and this made configuration a bit of a
hassle on first setup or network changes. With that
addition I also decided to clean up the code and
make it open-source, and here we are. I don’t have
any future upgrade plans at this time. My friend
has made a couple of suggestions for some new fun
features, such as lighting up a hold momentarily
so it’s easier to see which hold you have set, but I A lot of coding went into PeggyBoard – routes,
haven’t set time aside to implement them yet.” 03 LED control, web services, and a web app, built
Hopefully the garage roof won’t need further using several kinds of technology
reinforcement for it.

Peggy Board magpi.cc 23


PROJECT SHOWCASE

YAFC Flux
Capacitor
A classic time travel film prop brought about via Raspberry Pi
caught the eye of Rosie Hattersley, a sucker for all things 1980s

T here’s plenty of interest in the 1980s:


from Ghostbusters, The Goonies, to Back
to the Future; whether riffing on cultural
references and storylines a la Stranger Things or
recreating props and costumes for cosplay and
However, he wanted to design something other
than the replica props made from LED strips he’d
seen online. Bizarrely, the idea to focus on the
visual and audio effects of Back to the Future’s flux
capacitor came to mind when he was frying food
Halloween. In fact, so prevalent are such remakes and the sizzles triggered a memory.
that creator Ambrogio Galbusera named his Marty
Ambrogio McFly and Doc Brown prop YAFC (yet another flux Time flies
MAKER

Galbusera capacitor): magpi.cc/yafc. Ambrogio’s idea was to reproduce the “energy


Ambrogio was keen to create a replica of the flow” effect in the flux capacitor by means of
Ambrogio is a keen iconic flux capacitor that appeared in the Back to a video created with a video editor with which
paraglider and “a
true enthusiast the Future film series and which Doc Brown reveals “you are free to create any special effect you
who finds joy to Marty “is what makes time travel possible”. may think of”. He typically uses VSDC, which he
in the blend
of technology,
creativity, and
the exhilarating
freedom of
the skies”

magpi.cc/
ambrogio

X YAFC Flux Capacitor


is largely made from
household objects

24 magpi.cc YAFC Flux Capacitor


PROJECT SHOWCASE

Maker Ambrogio
Different animations are
created animations
selected via the external
simulating the flux
buttons and shown on
capacitor from
the 7-inch display
Back to the Future

Raspberry Pi 4 and Pimoroni


Automation HAT hidden in a Quick FACTS
cardboard box display a range
of electrifying flux effects > Ambrogio often
shares his builds
on Element14

> He threaded
wires from an
old multimeter...

> ...through clear pen


cases serving as
energy conduits...

> ...capped by the


bases of tealight
candle holders

> Flux effects


are triggered
by a Pimoroni
Automation HAT

S A resprayed box and well-chosen animations result in a stunning film prop

YAFC Flux Capacitor magpi.cc 25


PROJECT SHOWCASE

S Pimoroni’s
Automation HAT sits
atop Raspberry Pi 4 He created an energy flow animation in which
three streams all move into the centre
finds an extremely powerful tool despite being line”. This appealed because he wanted to control
free. He created an energy flow animation in the volume and the clip being played by means
which three streams all move into the centre of push buttons. Ambrogio is also a big fan of
and added a lightning effect by stripping out Python. “From a maker point of view, [Python] is
part of a thunder chroma clip from Pixabay: a great language since it does not require complex
magpi.cc/thunderchromakey. environment setup.”
There are “plenty of LCD screens that connect
to Raspberry Pi through its display interface. Not Reuse and reduce
having the extra cabling required by a standard Alongside Raspberry Pi 4, Ambrogio used a 7-inch
HDMI screen makes the final build more compact LCD display and a Pimoroni Automation HAT
and cleaner,” Ambrogio reasoned. As a maker, he mini board. Ambrogio wrote a Python 3 script to
regards Raspberry Pi as “a must-have, because read the status of the buttons and control the VLC
it gives you all the capabilities of a fully fledged media player. He also designed and printed some
Linux system in a fanless, low-power, tinkerable 3D parts. The other components for his YAFC Flux
package”. He also notes that Raspberry Pi comes Capacitor were largely assembled from leftovers
with a preinstalled VLC media player – “a great hanging around in his lab, such as the buttons and
player that can be controlled from the command wires. He recycled and spray-painted a cardboard

26 magpi.cc YAFC Flux Capacitor


PROJECT SHOWCASE

Electrifying effects

Create the video effects you want for the


01 flux capacitor using a video editor and copy
them to an SD card. Alternatively, use the video
clips Ambrogio shares along with his source code:
magpi.cc/yafcgit.
box as a case for the screen, then repurposed
candles and used clear plastic pen cases for the
lighting and flow effects.
In comparison to Ambrogio’s other makes
– among them a Rube Goldberg machine to
increase your self esteem and an automated crop
grower – the YAFC Flux Capacitor project “was
not particularly complex”, turning out as expected
from the outset without the need for multiple
iterations. Having tweaked the VLC media player
commands, Ambrogio solved everything in maybe
Trace around the screen, Raspberry Pi and
a couple of hours, thanks to the great resources 02 Automation HAT and cut out a space for them
available on the web. in the cardboard box (decorating it as you wish) then
The availability of inexpensive displays that connect to hardware buttons and a power supply.
work with Raspberry Pi and relatively low
overheads for the project makes it fairly easy
to replicate. Ambrogio used Raspberry Pi 4,
“but even an older version should be fine for
T A still from Back to
this project since there are no strict requirements the Future shows the
in terms of computing power. original flux capacitor

Use ballpoint pen cases, tealight bases and


03 electrical wires to simulate the electrical
effects which the video animation shows onscreen.

YAFC Flux Capacitor magpi.cc 27


PROJECT SHOWCASE

THEA500 Mini keyboard


THEA500 Mini console is something to write home about if
you’re an Amiga fan – until you realise you can’t use its
keys to do so. David Crookes discovers a solution.

F ans of Commodore’s Amiga range of


computers were overjoyed when a
miniature version of one of the machines
was released in April 2022. THEA500 Mini, as
it’s called, is a plug-and-play reimagining of
the Amiga 500 but, while it’s capable of playing
thousands of games and comes with a mouse and
Dean joypad, there’s a little problem with the keyboard.
MAKER

Woodyatt It doesn’t work.


Try as you might, you’ll never be able to bash
Dean Woodyatt those keys because they’re a solid, non-moving,
hails from Wales
but now lives near unconnected block of plastic. That, however, hasn’t S The keys were twisting out of alignment, and Dean found oval
Sydney. Having prevented one Amiga enthusiast from dreaming switches were the best solution
studied electronics, of an alternate reality. Rather than plug in an
he describes
USB keyboard as suggested by THEA500 Mini’s acutely aware that people hate to take a pair of
himself as a tinkerer
and a hoarder of manufacturer, Dean Woodyatt has spent a couple of snips to their devices, but this cuts away a small
any old tech. years creating a working keyboard mod. He did the support inside that can’t be seen. Only a few
magpi.cc/thea500 same for THEC64 Mini so he’s proving to be a dab millimetres need to be shaved off.”
hand at such things.
If the cap fits
Key to success To create the keyboard, Dean made a schematic
It hasn’t been easy. THEC64 Mini keyboard mod and designed the PCB and component footprints
used an ATMega32U4 microcontroller, but Dean using the web-based tool EasyEDA, onto which
found it didn’t have enough inputs to handle key switches and locking mechanisms were
all of the small-factor Amiga’s keys. “THEA500 placed. He also designed and 3D printed a set of
Mini has nearly 100 keys and the 32U4 can only keycaps, being sure to make them look and feel
comfortably handle 64,” he says. “Using the raw as authentically Amiga-like as possible. He even
T The original non-
32U4 chip, adding support circuitry and having included a light beneath the Caps Lock key.
working THE A500 it assembled to gain access to enough IO to just
Mini keys were too
tall and densely
packed – the gap
about handle THEA500 Mini keys was really too
difficult and expensive.”
There is very little
between them is just
0.245mm so Dean
Dean also found another issue: “There is very room inside the case
made his own set little room inside the case for a keyboard,” he
says. As such, he needed to find a simple, small for a keyboard
solution and decided to make use of Raspberry Pi
Pico. “It really makes THEA500 Mini keyboard “For the keycaps, I learned how to use a resin
possible,” Dean explains. “It has enough IO to printer and, because no one manufactures resin
make a 10 x 10 keyboard matrix possible, it’s in the right shades of brown and beige to match
super-cheap and it’s been widely available despite the Commodore computers, I spent a few months
all the component shortages. researching how to colour resin,” Dean says.
“Raspberry Pi Pico is also super slim and it With that done, it’s a matter of connecting
allows a keyboard to fit inside THEA500 Mini by the PCB to Raspberry Pi Pico and hooking up to
making only one small change to the case. I’m THEA500 Mini motherboard. “I’m using a fantastic

28 magpi.cc THEA500 Mini keyboard


PROJECT SHOWCASE

If at first you don’t succeed… Quick FACTS


This project has gone
through many iterations. The > THE A500 Mini
PCB is now on version 10! console runs
Amiga games

> It looks just like a


small Amiga 500

> A USB keyboard


can be attached...

> ...But this solution


pops working keys
into the case

> The PCB is 1.2mm


thin, allowing the
case to close

The project fits into


an existing THEA500
Mini case with minimal
modification – the original
innards remain too

T This is where it all


began. As an in-
joke, the keyboard
has n-key rollover
– accidentally press
Raspberry Pi Pico allows the multiple mini keys
keyboard to communicate with simultaneously and
the computer. A DIY keyboard all keypresses will
the registered
firmware framework called
PRK handles the process

firmware called PRK which allows you to simply


drag and drop a text file containing the keyboard
map over to Raspberry Pi Pico,” Dean says. The
hard work, however, continues.
“The project is about 80% finished, and the
final 20% is iterating small parts to make it
easier and cheaper to manufacture,” he adds. As
for the motivation, well that’s something many
retro enthusiasts will understand: “I do all this
stuff mainly for me,” he confesses. “I’m really
just channelling my teenage self, and using my
learned skills to do stuff I figured would be cool
back then.”

THEA500 Mini keyboard magpi.cc 29


PROJECT SHOWCASE

3D Laser Radar
Scanning items with lasers creates interesting photographs.
Rob Zwetsloot scans the results with his eyes.

T here are many ways to 3D scan objects,


all of which seem to have been done with
Raspberry Pi at some point. They’re usually
done to create 3D scans, however WIZnet engineer
Gavin Chang is doing something a little different
with laser scanning.
“I wanted to make a radar application based
Gavin on a two-degrees of freedom laser module,”
MAKER

Chang Gavin tells us. “Through the actions of two


servos, the laser module can scan in 3D to form
An engineer at distance information of all points in a space.
WIZnet who
likes IoT and This can be rendered through an algorithm to
using it to solve form a photograph, and the information is then
problems in life. sent to the display hardware ‘Cloud Pixel’ through
magpi.cc/ the network to show the measurement results.”
gavinchang The images it produces are pretty cool S The laser sensor can pan and tilt, and can be controlled
manually to get a standard distance read out
and abstract, using a sort of heat map overlay
to separate the layers of the object being
scanned to recreate the object. It’s built with Laser is an acronym
RP2040 and RP2040-powered devices at its Having developed some parts of the Laser Radar
core, which Gavin chose because of the great already, this ended up just being the first use of
support. He used it to create the scanning rig the components.
called Cloud Motion and also the Cloud Pixel “My project development process always starts
display. He seems pretty proud of making with a hardware platform, and then I develop
everything out of RP2040 and having them talk corresponding projects based on the hardware
Warning! via Ethernet or Wi-Fi. platform,” Gavin explains. “This time for 3D Laser
Laser pointer Radar, I first made the Cloud Motion hardware,
Be careful when using
and then used 3D Laser Radar as the first project
laser pointers in your using this hardware. As hardware with networking
projects and don’t aim
a laser pointer at a and servos, I think there are many applications
person’s head. suitable for it. For example, I can change the laser
magpi.cc/lasersafety sensor to an infrared imaging sensor, which can
be set to always look at the point with the highest
temperature in a given space using the servos.”

Lase is a verb
X The heart object is
visible on the screen
Overall Gavin seems pretty happy with how the
– due to the way project turned out – at the very least it does
the laser pans, the
edges are technically
what he set out to do. He does have a few things
farther away he’d like to improve though: “First, because

30 magpi.cc 3D Laser Radar


PROJECT SHOWCASE

The distance between the


laser and the object and wall
are measured and recorded
The Cloud Motion uses a
two-degrees of freedom
laser to scan in front of it

The data is processed to create


an image on the screen

Quick FACTS
> It took Colin 50
hours to make

> He 3D-printed the


My project development process always chassis at his local

starts with a hardware platform, and then


Tesco Express

> The batteries can


I develop corresponding projects based on last eight hours at
full power
the hardware platform > It cost £55 in parts
from CPC

there are many points that need to be scanned, > Colin used
and each point requires a servo to operate, it xyz resources to
takes a long time to complete the scan,” Gavin learn techniques
says. “My next improvement direction will be (xyz.com)
to speed up the scanning speed and shorten the
scanning time. Secondly, after the scanning is
completed, I use Cloud Pixel for display. The
image algorithm needs to be optimized so that
the outline of the target object can be displayed
more accurately.”
We’d be interested to see how a sharp 3D-scan-
W It can detect the
to-photo would be, but for now we quite like the curves in objects
fuzzy edges. such as cans

3D Laser Radar magpi.cc 31


PROJECT SHOWCASE

SNES XL
BFG means Big Friendly Gamer. By Ashley Whittaker

S NES XL is a gigantic Super Nintendo


controller built by Arnov Sharma. It has
functioning buttons and Raspberry Pi hidden
inside, so you can play retro games and pretend
you’re a Borrower at the same time.

Button management
Arnov Every button on SNES XL controller has its own
MAKER

Sharma custom PCB, created using PCBWay (pcbway.com)


an online service for producing PCB prototypes. Each
Arnov is a board is shown fully working by Arnov on YouTube
microcontroller
enthusiast and a (magpi.cc/snesxlyt). Tactile switches on the custom
maker from India. boards are positioned just below the 3D-printed
magpi.cc/ buttons, such that pressing a button toggles its
arnovsharmer switch. Each of the switches is wired up to a pin on
a XIAO SAMD21 (magpi.cc/samd21) development
board from Seeed Studio (see Figure 1). When
SNES XL is connected to a computer (in this case
Raspberry Pi 4), the Seeed XIAO appears as a gaming
controller icon and can be selected for gameplay. S The SNES XL is fully working (although hard to hold). Here,
Arnov is using it to play a game of Doom!
Too big to print or hold
Arnov designed the controller housing in
Fusion360. It had to be 3D printed in three
X Figure 1: The
buttons are separate parts due to its size, before being
switches wired superglued together. More videos and images
up to a pin on
a Seeed XIAO can be found on Arnov’s Instructables
SAMD21 board (magpi.cc/snesxlinst).
Retro game emulation here comes courtesy
of Recalbox (recalbox.com). Power Pi, a
Raspberry Pi dock/enclosure with an integrated
lithium cell battery pack that Arnov also
designed, provides power.
Arnov has to set the controller flat on the

32 magpi.cc SNES XL
PROJECT SHOWCASE

Each button has a custom PCB


Arnov’s SNES XL is a (printed circuit board) that
gigantic 3D-printed enables them to be pushed
game controller that
is fully functional

Quick FACTS
> The buttons are
12 × 12 mm switches

> While the case is


3D printed...

> ... Each button has


The controller is connected to its own PCB
Raspberry Pi and playing an
open-source version of Doom! > The D-PAD is
four PCBs

> The PCBs were


created with
PCBWay

It had to be 3D printed
in three separate parts
due to its size
W Inside the giant
table to play games, because it’s too big to hold 3D-printed case
comfortably. Our favourite Raspberry Pi builds
are the ones that are so absurd they turn out to all-in-one desktop gaming system based around
be unusable for their originally intended purpose. Raspberry Pi 3B+ and featuring on-board power as
The BFG would have no problem, but we’re still well as a dedicated cooling layer.
not sure if he’s real or not. We’ve let Nessie and PALPi (magpi.cc/palpi), a handheld games
Bigfoot go, but we’re hanging onto our oversized console with a retro aesthetic that’s powered
childhood friend. by Raspberry Pi Zero W, is another of Arnov’s
creations. Let’s start taking bets on what he builds
Gamer geek next. We’re thinking he might go to the other end
Arnov has graced us with his Raspberry Pi-powered of the size spectrum and come up with something
gaming kit twice before. The first time was with miniature. Maybe a teeny, tiny, thimble-sized Wii
SANDWICH DOT IO (magpi.cc/sandwichdot), an controller for dainty indoor tennis and golf.

SNES XL magpi.cc 33
PROJECT SHOWCASE

PicoZX
Handheld
Build your own handheld ZX Spectrum
with Raspberry Pi Pico. By Ashley Whittaker

K en St. Cyr from the excellent YouTube


channel What’s Ken Making isn’t quite
over having to spend his childhood in the
US where Sir Clive Sinclair’s ZX Spectrum wasn’t
available. Fast forward a few years, and Ken has
Seeing as Sinclair was a pioneer of affordable
home computing with the ZX Spectrum, it’s pretty
cool to see a modern-day emulator running on a
microcontroller which costs just $4/£4.

enough bits and pieces in his workshop to make How is it made?


pretty much any computer he damn well wants. PicoZX is made up of several custom PCBs, but the
Ken St. Cyr Well, he can emulate any computer, anyway. Pico and most of the device’s parts are soldered
MAKER

Peter Misenko (Bobricius to his friends on GitHub, onto one main board. There’s also a faceplate,
Ken is an magpi.cc/bobriciusgit and YouTube, magpi.cc/ which is largely cosmetic and holds everything
electronics
bobriciusyt) is the brain behind the original design in place nicely, and a backplate, which holds the
enthusiast, and
lifelong technology for PicoZX (magpi.cc/picozx), and PicoZX Handheld battery and the charge controller. The other four
tinkerer. Be sure (magpi.cc/picozxhandheld) – the Raspberry Pi Pico- PCBs frame the device around its edges, leaving
to visit his popular
based Spectrum emulator that inspired Ken. openings for the microSD card and USB ports.
YouTube channel.
A 2.8-inch IPS display soldered directly onto the
magpi.cc/ main PCB is the screen for the device. Fifty 7mm
whatskenmaking
You’ll have 1980s nostalgia tactile switches give the tiny QWERTY keyboard its
clickety tactility. PicoZX can also be used with a
coming out of your ears joystick; Ken showcases an Atari 2600 joystick in

after a couple of hours his build video.

with this thing


Peter’s short and snappy demo video
Warning! (magpi.cc/picozxyt) explains the project, but Ken’s
Solder longer build video (magpi.cc/picozxken), goes into
more detail on how he made his version.
This project requires Reason number one why I personally would argue
soldering. Brush up on
your soldering safety [are you sure you want to do this – Ed.] that PicoZX
before starting on it.
might be even better than the original ZX Spectrum:
magpi.cc/soldering it exists in the now. Reason number two: it’s cuter
because it’s smaller, meaning you can also use it as a
handheld device and carry it around in your pocket.
Reason number three: it’s built on Raspberry Pi Pico. S Ken’s version of the PicoZX Handheld in eye-catching black

34 magpi.cc PicoZX Handheld


PROJECT SHOWCASE

The 2.8-inch display enables Here is Peter’s original white


you to rediscover ZX Spectrum version of PicoZX Handheld
software on the move.

Quick FACTS
> Pico ZX emulates a
Spectrum 128K

> It has VGA output…

> ...while Pico ZX


The keyboard has original Handheld has a
ZX-style keys with shortcuts 2.8-inch screen
for all the BASIC commands
> ●Both have a
printed next to them
ZX-style keyboard

> You can buy it on


Tindie for $16

How does it work? W Components being


soldered onto the
The Raspberry Pi Pico runs Fruit-Bat’s ZX PicoZX Board

Spectrum emulator (magpi.cc/fruitbat) and


Jean-Marc Harvengt’s Multi-Computer Machine
T The rear of PicoZX
Emulator (M.CU.M.E, magpi.cc/mcume). So not
shows an array of
only do you have all of the original ZX Spectrum output ports
programs at your fingertips, but you can also
emulate other devices – such as the Commodore
64, Atari 2600, and ColecoVision – all in one
compact handheld device. You’ll have 1980s
nostalgia coming out of your ears after a couple of
hours with this thing.

Remembering Clive Sinclair


I’d wager you’re an admirer of Sir Clive Sinclair,
the inventor of the ZX Spectrum, who died in 2021.
Raspberry Pi co-founder Liz Upton wrote a short
but sweet note (magpi.cc/sirclive) on the day we
heard the news, and the comments section quickly
filled with stories from people who had been
inspired by his work. Have a look if you’d like to
take a scroll down memory lane.

PicoZX Handheld magpi.cc 35


SUBSCRIPTION

SUBSCRIBE TODAY
FOR JUST £10
Get 3 issues + FREE Pico W
Subscriber Benefits
FREE Delivery
Get it fast and for FREE

Exclusive Offers
Great gifts, offers, and discounts

Great Savings
Save up to 23% compared to stores

Subscribe for £10


Free Pico W
3 issues of The MagPi
£10 (UK only)

Subscribe for 6 Months


Free Pico W
6 issues of The MagPi

+ £30 (UK)
€43 (EU)
$43 (USA)
£45 (Rest of World)

Subscribe by phone: 01293 312193


Subscribe online: magpi.cc/subscribe
Email: [email protected]
Subscribe for £10 is a UK-only offer. The subscription will renew at £15 every three months unless
cancelled. A free Pico W is included with a 6-month subscription in USA, Europe and Rest of World.

36 magpi.cc
SUBSCRIPTION

SUBSCRIBE TODAY AND GET A


FREE Raspberry Pi Pico W
Subscribe in print
today and get a FREE
development board WORTH

A brand new RP2040-


based Raspberry Pi Pico
$6
W development board

Learn to code with


electronics and build
your own projects This is a limited
offer. Not included
with renewals. Offer
Make your own home subject to change or
withdrawal at any time.
automation projects,
handheld consoles,
tiny robots, and much,
much more

Buy now: magpi.cc/subscribe

SUBSCRIBE
on app stores

magpi.cc 37
SUCCESS STORY

SUCCESS STORY magpi.cc/success

Velo AI
This smart bike light with road monitoring relies on
Raspberry Pi’s capable low-power compute. By Phil King

L ow-cost, low-power, compact and


performant, Raspberry Pi Compute Module
4 is at the heart of Velo AI’s (velo.ai) debut
road safety product, which alerts cyclists to
vehicle movements behind them.
Raspberry Pi Compute Module 4, it can detect and
distinguish nearby vehicles, understand when one
is about to overtake, and identify an aggressive
or distracted driver approaching dangerously – in
which case, it issues audible and visual alerts for
With a core mission to improve safety for the cyclist and driver to help prevent dangerous
all forms of mobility through the use of smart situations and crashes.
technology, Pittsburgh-based Velo AI was co-
founded by robotics expert Clarke Haynes and AI The challenge
specialist Micol Marchetti-Bowick. Both have a Aware of the limitations of existing bike cameras
background in autonomous vehicle technology for and vehicle detection devices, the Velo AI team
the likes of Uber, and sought to apply similar AI sought to create a more sophisticated AI-based
algorithms to assist cyclists. Completing the core alternative to improve road safety for cyclists.
team is Alison Treaster, who is leading commercial As an example, says Haynes, a radar-based
partnership and community-building efforts for device such as the Garmin Varia “can’t figure
the startup firm. out if it’s a car behind you or a bus. And to a
Velo AI’s debut product is Copilot, an AI- cyclist, there’s a big difference in being passed by
powered bike light and camera. Based around a Toyota Corolla versus being passed by a large
municipal bus”. In addition, he points out, radar
only measures radially: “Radars can tell you if
something is approaching you, but they can’t tell
you if something is going to pass you with ten feet
of space or one foot of space.”
In moving from radar to a camera-based
solution, the aim was to create a device that could
tell the cyclist “a lot more about what’s going on
in the world and do a lot of things that the radar
can’t do”. The device would need to help cyclists
by providing situational awareness and alerts
about nearby vehicles. This includes the ability to
distinguish, using computer vision algorithms,
between different vehicle types, as well as to
estimate their relative speed and to identify and
predict driver behaviour.
The first step of developing Copilot’s AI
algorithms was to collect a large amount of
data from riding around a variety of road types,
with a focus on interactions with vehicles. This
process was aided by a beta-testing cohort of
Pittsburgh cyclists – ranging from commuters
to recreational riders – who were given a free
prototype unit to test.

38 magpi.cc Velo AI
SUCCESS STORY

While the Velo AI team has extensive experience


in the field of autonomous vehicles, there was
It can detect and distinguish nearby vehicles,
a steep learning curve involved in creating and understand when one is about to overtake,
selling a brand new physical product. “Jumping
in and figuring out what it takes to put together and identify an aggressive or distracted
a hardware product has been a huge challenge
for us,” admits Haynes. “So, OK, what’s the driver approaching dangerously
weatherproofness of this? How do we design a
lens to focus light for a bike light?” accelerating relative to you: “It’s getting closer to
A major challenge lay in cramming the camera, you… and that can either be directly behind you,
LEDs, electronics, and battery pack into a compact or it can be in an adjacent lane to you.” The third
and lightweight package. The device also needed to category is ‘overtaking’: “That’s when we think
be powerful enough to run AI neural networks, yet the vehicle is imminently going to pass you. And
with a relatively low power drain to enable it to be that’s probably the one you want to be most aware
used for longer bike rides. of, because that’s the closest proximity interaction
that they’ll have with you as a cyclist.”
The solution In addition, the device connects to a companion
Raspberry Pi Compute Module 4 is in effect the app on a smartphone which can be mounted on the
brain of the Copilot, aided by a custom Hailo AI bike’s handlebars to show the rider a simplified
co-processor to run the neural networks required road view with the positions of nearby vehicles.
for the device’s computer vision. A fixed-lens The app also enables the user to download video
Arducam camera is used to record video footage. footage of their rides.
The Copilot is supplied with a mount to fix it to Power to the unit is supplied by a rechargeable
a bike’s seat post or saddle rail, with the camera two-cell lithium-ion battery. With the Copilot
facing rearward. The AI analyses the live video consuming a mere 4–5 watts of power, that
footage and, depending on the type of driver equates to around five hours of battery life.
behaviour detected, custom alerts may be triggered
– audible for the cyclist, and flashing LED light Why Raspberry Pi?
patterns to alert the driver behind. The team experimented early on with Nvidia Jetson
Three main categories of vehicle behaviour boards for the prototype Copilot, but found that
are detected (magpi.cc/copilotyt) and used to they were too expensive and their GPUs too power-
trigger different alerts. ‘Following’ behaviour is hungry, according to Haynes. “If you’re going to
“when a vehicle is following behind you, but not run GPUs full tilt, you’re talking about something
accelerating toward you,” explains Marchetti- that even in a Jetson… you’re going 10 to 20 watts.
Bowick. ‘Approaching’ is when a vehicle is And then to have a battery to power something

Velo AI magpi.cc 39
SUCCESS STORY

With the added awareness it provides, the device


has already become an essential aid for some
cyclists, says Haynes. “We’ve got great feedback
from early customers that they don’t like having to
ride their bike without it on there.”
The team hopes that Copilot may have broader
social benefits. “The number one reason people
don’t bike more is they don’t feel safe,” notes
Haynes. “And so our goal was, let’s get more
people to bike, and let’s get them to bike more
because they feel safe.”
A major bonus is that data gathered from Copilot
devices can prove useful to aid local authorities
and road safety organisations seeking to make
cities and towns safer for cycling. “We are in the
middle of starting a partnership with the city of
Pittsburgh,” says Haynes, “where we’re going to
deploy dozens of these Copilots with people that
that’s going at 10 watts for many hours, because bike to work and use that to actually inform where
we want people to go for four- or five-hour do we need to improve the bike infrastructure?”
bike rides with this, it was just too much heat, Another pilot scheme is planned for Roanoke,
too much weight [due to a larger battery pack Virginia, reveals Treaster. “They are working on
being required]. And that’s what really led us to the Vision Zero campaign [with the eventual aim
the Raspberry Pi.” of zero deaths for pedestrians and cyclists]. And
The very first circuit board, before Velo AI they said it would be great to be able to get any
partnered with contract manufacturer and kind of data that’s specific to cycling before the
Raspberry Pi Design Partner Hellbender (magpi.cc/ legislation is passed to say we need to give cyclists
designpartners), was very simple: “We plugged in three feet of space when passing.” Post-legislation
the CM4 one side, we slotted in the M.2 Hailo on data can then be analysed to see how it has
the other side, and then connected the camera. And affected driver behaviour.
we had everything we needed to just prove that the “We’re absolutely interested in as much as we
compute stack worked. Since then, it’s advanced can do to get these devices out there and use this
more and more. But the mere fact that the CM4 is a data to make cycling safer,” adds Haynes.
separate discrete component that just works; we can
use everything that’s on it, including the Wi-Fi and
Bluetooth. That’s great for us to just get started.”
The search for running the AI with super-low
power consumption led them to add a Hailo AI
co-processor: “The combination of Raspberry Pi
plus Hailo made things super-easy to prototype
and develop,” says Haynes.

The results
The Copilot appeals to different types of cyclists,
says Treaster. “There’s not a particular customer
persona, but they want to support making streets
safer because they’re using streets as a cyclist
often.” Potential customers also include parents
and spouses who care about the cyclist in their life
and want something that’s going to keep them
safer on the road. “We’ve had a lot of folks say,
‘I would buy this for my son or daughter, I would
buy this for my husband’.”

40 magpi.cc Velo AI
SUBSCRIPTION

41
FEATURE

RASPBERRY PI
TROUBLESHOOTING
GUIDE 2024
Even the greatest friends can be frustrating
sometimes. PJ Evans sits you down, hands
you a tissue and asks how he can help

W ith a new model of Raspberry Pi comes


change. The advancement of this little
computer’s amazing capabilities bring
necessary changes to its operating system and
in turn compatibility with older (and sometimes
current) software and hardware. Since our original
troubleshooting guide (The MagPi issue #60:
magpi.cc/60), there’s a lot that has changed and
it’s only right that we revisit the guide and bring
it up to date for the newest member of the family:
Raspberry Pi 5. So, if you’re confused, perplexed or
downright frustrated with a Raspberry Pi project,
maybe some words of wisdom (or at least a clue)
can be found in these pages.

42 magpi.cc Raspberry Pi Troubleshooting Guide


FEATURE

My Raspberry Pi
will not power on! S Red LED in the
morning, boot
failure warning
Raspberry Pi gone a bit nihilist? No life to be Any signs of life?
found? It can be more than a little alarming when When you apply power, do you see any LED activity
you plug in your new project and… nothing. Here’s on the board itself? All Raspberry Pi boards have at
a list of things you can try to get to the bottom least one LED designed to indicate status. The red
of the problem. Sometimes it can be a real d’oh LED indicates power. If you do not see any red light
moment, sometimes there’s more to it. at all when you apply power, and you’ve proven
your power supply is OK, then you may have a
Check the power serious problem with your
supply Raspberry Pi. If it flashes,
We’ve all done it (in this It can be more than a power has been detected, but
writer’s case, many, many not enough to safely boot
times). Have you plugged the little alarming when the machine. A solid red LED
power supply into Raspberry means power is OK (well,
Pi and the mains? Have you you plug in your new kind of - again we’ll get to
switched the socket on? If that, see ‘Lightning strikes’)
the answer is yes, start by project and… nothin and the system will attempt
checking the supply itself. to boot.
Can you swap it out for a known-good supply and
try again? If not, try charging a compatible USB The green, green flash of boot
device and see if you confirm it is working. If you Within a second or two of the red light appearing,
have another Raspberry Pi to hand, check whether a green one should appear. On some Raspberry Pi
the power supply can power it. If you, so can boards this is a separate LED, on others the same.
eliminate it from your enquiries. Green indicates the microSD card is being accessed.
On a normal boot, the light will flash at irregular
Use the right power supply intervals as the card is accessed. However, if the
If you’re not getting any light on the Raspberry Pi LED starts pulsing in a regular pattern, there is
itself, again the supply may be faulty. If it has an an issue with the operating system or the SD card
untethered cable, check the cable itself is alright. itself. Consider trying a different microSD card if
The best choice of all possible. See magpi.cc/flashcodes.
is to have an official
Raspberry Pi power A pair of boots
supply. These have a A final check. There is a microSD card inserted,
slightly higher power isn’t there? Again, we’ve all done it. Check not
output than regular only that there is a card in place but that it’s
USB power supplies, snugly inserted. Is the Raspberry Pi configured to
which promotes more only boot from USB or an M.2 device? (See magpi.
stable operation. Read cc/raspiconfig). If so, reflash to move back to
more at microSD card booting. You can use Raspberry Pi
magpi.cc/power. Imager (magpi.cc/imager) to do this.

Raspberry Pi Troubleshooting Guide magpi.cc 43


FEATURE

Power, but nothing else


What to do when the operating system
won’t play ball
Let’s assume by this point you have a Raspberry establish where the issue is. You might also need to
Pi that is powering up and showing activity, but try the other HDMI port if you have a newer model.
you can’t get to the desktop or a command
prompt. The first thing we need to do is ensure Not all cards are alike
the microSD card is okay, and you have the right Buy from a brand or vendor you trust. That £10
operating system. 1TB microSD card may be cheap, but it’s unlikely
to be reliable (or even 1TB). A rule of thumb is
to pick the smallest capacity card for the job.
Don’t buy a 1TB card when 32GB will do. Smaller
The first thing we need capacities have been manufactured longer with
less cramped components, and are likely to be
to do is ensure the much more reliable.

microSD card is okay There is a bewildering array of standards you’ll


see around microSD cards, but the important one is
its class. Ideally you want a Class 10 card for your
Raspberry Pi. Buy from a Raspberry Pi Approved
There’s no video Reseller (magpi.cc/resellers).
If you’ve got this far then you’ll have a booting
Raspberry Pi but possibly no video. Time to start Operation!
with the (seemingly) obvious. Is the HDMI cable A reliable card needs the right operating system.
plugged in at both ends? Is it known to work? Is Luckily, a recent update to Raspberry Pi Imager
the monitor’s source correctly set? Is the monitor (magpi.cc/imager) has made this easier than
on? In some circumstances, plugging in a monitor ever. Imager now asks you which Raspberry
or TV after boot has started will result in no video Pi you are using and will then only show you
output (as the Raspberry Pi has no opportunity compatible images. You literally cannot go
to check capabilities). Make sure the monitor is wrong (but make sure you’ve identified your
on, and set to the correct source, and the cable Raspberry Pi - the model name is always etched
plugged in both ends, then boot your Raspberry Pi. on the PCB).
If you have another HDMI device, try that too, to Following these two steps will ensure you always
have the right SD card and the right operating
system. Now you hopefully have a booting system,
so let’s look at what else can cause a furrowed
brow and a raised eyebrow.

Low voltage
When using your Raspberry
Pi if you get a “low voltage
warning” in the top-right
you have a power problem.
This is typically caused by
S If you see this, you
need more power! using a non-standard power
supply (such as a mobile
phone charger) to power
your Raspberry Pi. The operating system reacts by
throttling the CPU speed so less power is required,
slowing your machine down. In some cases, your
Raspberry Pi may power down altogether. Using
the wrong supply can permanently damage your
Raspberry Pi. Get an official power supply
(magpi.cc/powersupply).

44 magpi.cc Raspberry Pi Troubleshooting Guide


FEATURE

T If you need
composite output,
this new header
is where to find it

HDM-why?
How to get your display looking sharp
Ok, so we’ve booted, power’s good, but the picture entirely on Raspberry Pi 5.
is terrible. What’s going on? If you’re seeing a However, you can still get
fuzzy but stable image, there’s probably been a bit composite video out by soldering
of an argument between the Raspberry Pi HDMI a header to J7, next to HDMI 1.
circuitry and the connected monitor, especially if If you don’t get an image, make
it is a TV. Some TVs lie to connected devices about sure composite output is enabled
their true capability, often advertising a 1080p using raspi-config from the
resolution when the truth is nearer 1280 × 768. command line.
You have to force the resolution at boot time by
modifying /boot/config.txt. Other video options
If you need a DVI connection for video, these are
Where’s the composite connector? directly compatible with HDMI, so you just need
If you’re looking to get composite video out of the right cable and nothing else. VGA is possible,
a Raspberry Pi, maybe for your retro gaming but you will need a USB adaptor. Make sure you
project, you may see that the combined audio/ check for compatibility first, as not all will work
video socket on earlier models has disappeared with Raspberry Pi.

Audio aggro
Audio has never been straightforward on
Linux-based systems but the new PipeWire
system is the best yet
Audio has changed with the new Raspberry Pi 5
boards. Although the classic ALSA audio system
Raspberry Pi 5 uses its two
is still present, in the desktop environment the HDMI sockets as primary
previous PulseAudio system has been replaced
by PipeWire. If you’re enjoying the sound of audio and video output
silence a little too much, here are some things
you should know.
add a USB-based audio adapter or use a HDMI
Where do I plug my headphones in? breakout box, which can output the audio to a T Sound controls look
Raspberry Pi 5 uses its two HDMI sockets as headphone jack or RCA connectors. the same, but a new
improved back-end
primary audio and video output. The audio/ controls the audio
video socket present on previous models has I want to build a media centre
been removed. You can still get composite video There are a world of compatible
output from the J7 header on the board, but for DAC (digital-analogue convertor) audio HATs
audio you will need an inexpensive USB audio which provide much superior sound quality.
adaptor. This will also have the bonus of audio There’s the official model or a wide range of
input so you can record through it. audiophile choices with an even wider range
of price. Even the budget HATs will provide
There’s no sound from my HDMI much better analogue sound output than the
Firstly, does the monitor or TV you’ve connected Raspberry Pi alone. Check The MagPi #117
up support it? If your montitor lacks sound, either (magpi.cc/117) for tips on improving audio.

Raspberry Pi Troubleshooting Guide magpi.cc 45


FEATURE

Installing software
Boosting your Raspberry Pi capabilities with
new software is not always plain sailing

The ‘standard’ Raspberry Pi OS image contains a


great range of software, from office applications
to programming IDEs and multimedia tools, but
that’s just the tip of the iceberg. If you’re looking
for some software to do that special job for your
new cool project, getting it on to your Raspberry Pi
might be much easier than you think.

How do I install new software?


By far the easiest, pain-free way to enhance your
Raspberry Pi is you use the official Recommended
Software app. In here you will find carefully
selected and tested software applications that
T Get the best have been approved by Raspberry Pi for use on
Raspberry Pi Raspberry Pi. Find Recommended Software under
software easily with
Recommended the Preferences menu. However, this is by no
Software means a definitive list of what’s available.

The app I want is not available in


Recommended Software
Through the command line, we can access APT,
the Advanced Package Tool. This is our Swiss army
knife of software installation and management.
Often you will see installation instructions such as
apt install [packagename] which invites you to do
just that on the command line (Terminal). If you
find you’re getting errors, remember to add sudo,
which gives APT the right permissions to install
new software. You can also remove software or find
new software using apt [search string].

The app I want isn’t on APT, but I have


the source code
Here things get a bit more technical. Firstly, check
whether the authors have created a separate APT
repository and if they have provided instructions
for adding it to APT’s list of sources. That will be
the most frictionless way. If not, check whether
the app has dependencies - other software required
for it to work, and make sure these are installed in
advance. Finally, check your OS has the required
tools installed to compile the app by running sudo
apt install build-essentials. Now follow the
compilation instructions very carefully.

46 magpi.cc Raspberry Pi Troubleshooting Guide


FEATURE

Networking
Wi-Fi weird? Network nobbled?
All about making connections. W For the easiest
and most reliable
networking, use a
wired connection
This is possibly the most complicated topic.
Modern networking is fiercely complicated and
there are many ducks you have to get into a row for
things to run smoothly. Although wired networking
is straightforward these days, Wi-Fi is harder and Where’s my Raspi-config
things have changed significantly in Bookworm Raspberry Pi? Your best friend for
with the introduction of Network Manager, which A common problem
makes network configuration easier than ever when setting up a smooth configuration
before but can cause problems with older scripts Raspberry Pi for remote
and utilities. Here, we’ll look at getting a working (headless) access
network connection. is trying to find it
afterwards. Yes, it’s
But it used to work… probably sitting there in
A disadvantage of moving to the new Network front of you, but where
Manager system is that a lot of pre-existing is it on the network?
network configuration scripts and utilities will The first approach is to
no longer work with a Raspberry Pi running try the hostname. This
Bookworm. If you find that a utility will no longer is the network name of Many of the troubleshooting tips here
install, especially one that configures Wi-Fi, you the computer, It defaults require you to run raspi-config or
will need to see if an update is available. to raspberrypi but you Raspberry Pi Configuration. Why? Well,
can customise it at any rather than you having to learn all kinds
time and may have set it of arcane GNU/Linux commands that

First let’s see if you have in advance when using


Raspberry Pi Imager.
can change from version to version,
raspi-config wraps all the common
a connection at all If you have access to
a command line on
configuration tasks up in a single
menu-driven app. Get to know it!
another computer, try
No internet connection? this command:
First let’s see if you have a connection at all. The
best thing to do is to start with a wired Ethernet $ ping raspberrypi.local
connection and then move to a Wi-Fi connection
(if desired) once everything is working. If it’s not If that doesn’t work try it without the ‘.local’ at the
possible to move your Raspberry Pi to a wired end.
connection, we can still poke around and see ping raspberrypi
what’s going on.
Make sure your Wi-Fi configured! The easiest
way to do this is on the desktop itself. Click on
the networking icon in the menu bar (next to the
clock) and you can set the SSID (Network name) If your machine is found then your network
and password there. Check that you’ve set your supports zeroconf networking and all is good. If
country correctly. The operating system needs to you get ‘Request timed out’ or similar, it may not.
know the country you are in to ensure only legal If you’ve got access to the local console itself, you
frequencies and channels are used, and will disable can run this command:
Wi-Fi until this has been done. You can check this
in raspi-config under System Options. $ ip address show

Raspberry Pi Troubleshooting Guide magpi.cc 47


FEATURE

Best practices
A few tips for looking after
your Raspberry Pi setup

Keep things up to date in the first place as it is off by default. Open


If you’re using Raspberry Pi Desktop, you Raspberry Pi Configuration on the desktop or
will be alerted when updates are available. raspi-config on the command line and select
Always make sure you install them as soon Interface Options, then VNC, and select Yes to
as possible as security updates are often included. If you’re a enable the server.
command line user, make sure you run sudo apt update && sudo If you still can’t get a connection, make sure
apt full-upgrade on a regular basis. your client is TigerVNC (note: not TightVNC).
This has been tested and approved for use with
Protect your Raspberry Pi Bookworm. If you still find you cannot connect,
The single best investment you can make omit the ‘:0’ that many VNC clients require
for your Raspberry Pi is a good quality after the hostname.
case. There is a huge selection available
with alternatives for special applications Unable to access using SSH
such as industrial and even underwater! SSH is a way of securely getting to your command
Check out The MagPi #131 (magpi.cc/131) line remotely. Again, this is not enabled by
for ten of our favourites. default. You can enable it using Raspberry Pi
Imager so you’re ready to go, or use Raspberry Pi
Back it up! Configuration on the desktop or raspi-config. Just
Never have a single point of failure for your like with VNC, go to Interface Options and then
data. Follow the 3-2-1 rule: three copies of SSH to enable.
everything, two different media, one in a
different location. You can image microSD DNS Problems
cards directly or use services such as iDrive to If you find you can ping your Raspberry Pi’s IP
automatically back up into the cloud. Cards fail! address but not its hostname, there are a few
things you can do. First check you’ve set the
Keep it cool hostname correctly. The easiest way to do this is
The new active cooling support in Raspberry to open a Terminal window and run:
Pi 5 means not only can you attach a fan to
the board, but it’ll only run when it needs $ cat /etc/hostname
to. Ideal for when peace and quiet are a
concern. The official cooling kit combines Not what you expected? You can safely change it
a quiet fan with a sizable heatsink and many different cases in raspi-config by going to System Options then
with built in active cooling are already available. Hostname. Once changed, you’ll need to reboot for
changes to take effect.
If no joy, have you tried adding ‘.local’ or
You’ll see three devices, lo, eth0 and ‘.broadband’ after the hostname. Some routers
wlan0, which are internal, Ethernet and Wi- require this.
Fi respectively. From here you can get your Finally, check the service that takes care of all
IP address. If local access is not a problem, a this is running. From a command line run:
smartphone app like Fing can scan your network
and recognise your Raspberry Pi. If that fails, you $ sudo systemctl status avahi-daemon
may not have a working network connection yet.
Check the status is ‘active’. If it’s not, try and
Unable to access using VNC restart it:
VNC has changed in Raspberry Pi OS Bookworm
and, at the time of writing, many popular VNC $ sudo systemctl start avahi-daemon
clients are no longer compatible. The first thing
to check is that you have enabled the VNC server Now everything should be working as expected.

48 magpi.cc Raspberry Pi Troubleshooting Guide


FEATURE

S Some HATs,
such as this one,
require software
configuration before
they will work

GPIO woe
LED not lighting? Sensor won’t sense?
All about common GPIO issues.

Connections to the GPIO come in different forms. In all cases these need to be explicitly switched
There’s good old-fashioned 3v3 circuitry or more on using raspi-config or the desktop Raspberry Pi
complex communications systems such as I2C and Configuration app in order to function properly.
SPI. Not all of these are enabled by default to avoid You’ll find all these under Interfacing Options.
conflicts. Finding out what is enabled and what is
not is often key to getting things working. HAT a bit flat?
Just like stand-alone sensors, HATs often take
advantage of protocols such as I2C and SPI. Often
Start by building a simple supplied install scripts will check this for you, but
sometimes the HAT just flatly refuses to work. Just
circuit such as a classic like with the sensors, check the requirements and

LED project enable what you need. Read the documentation.

A simple test
To check everything is well with your GPIO, start
by building a simple circuit such as a classic LED
project like this: magpi.cc/scratchled. If you are
Getting further help
bathed in a beautiful light, then you at least know
One of the best things about Raspberry Pi
the GPIO is functional. is the community. It has a reputation for
My sensor is senseless friendliness and acceptance of ‘newbies’
More complex components such as temperature
sensors tend to use protocols rather than • Check out the Raspberry Pi forums at
straightforward level changes. In these cases, raspberrypi.com/forums for a wealth of expertise
Raspberry Pi OS needs to know what protocols are
in use. Examples of these are 1Wire, I2C and SPI. • Look out for Raspberry Pi community groups on
social media websites
• Check out literally years of questions and
answers on Raspberry Pi Stack Exchange:
magpi.cc/rpstackexchange

Raspberry Pi Troubleshooting Guide magpi.cc 49


TUTORIAL

Get to know your


Part 01

Raspberry Pi
Introducing your new credit-card-sized computer. Take a guided
tour of the Raspberry Pi, find out how it works, and discover
some of the amazing things you can do with it.

R aspberry Pi is a remarkable device: a fully


functional computer in a tiny, low-cost
package. Whether you’re looking for a
device you can use to browse the web or play
games, are interested in learning how to write
These boards have found their way into homes,
classrooms, offices, data centres, factories, and
even self-piloting boats and satellites.
Various models of Raspberry Pi have been
released since the original Model B, each bringing
your own programs, or are looking to create your either improved specifications or features specific
own circuits and physical devices, Raspberry Pi to a particular use-case. Our Raspberry Pi Zero
– and its amazing community – will support you family, for example, are tiny versions of the
Gareth
MAKER

every step of the way. full-size Raspberry Pi which drop a few features
Halfacree – in particular the multiple USB ports and wired
Gareth is a network port – in favour of a significantly smaller
freelance
technology
Raspberry Pi – and its layout and reduced power requirements.
All Raspberry Pi models have one thing in
journalist, writer,
and former system amazing community common: they’re compatible, meaning that most
administrator in the software written for one model will run on any
education sector
with a passion
– will support you every other model. It’s even possible to take the very
for open-source
software and
step of the way latest version of Raspberry Pi’s operating system
and run it on an original pre-launch Model B
hardware. prototype. It will run more slowly, it’s true, but it
magpi.cc/ Raspberry Pi is known as a single-board will still run.
halfacree computer, which means exactly what it sounds In The Official Beginner’s Guide (magpi.cc/
like: it’s a computer, just like a desktop, laptop, beginnersguide) you can learn about Raspberry
or smartphone, but built on a single printed Pi 4 Model B, Raspberry Pi 5, Raspberry Pi 400,
circuit board. Like most single-board computers, and Raspberry Pi Zero 2 W: the latest and most
Raspberry Pi is small – it has roughly the same powerful versions of Raspberry Pi. Everything you
footprint as a credit card – but that doesn’t mean learn can be easily applied to other models in the
it’s not powerful: a Raspberry Pi can do anything Raspberry Pi family, so don’t worry if you’re using
You’ll Need a bigger and more power-hungry computer can a different model or revision. Here is the first
do, from browsing the web and playing games to chapter from the book to give you a guided tour
> Raspberry Pi Computer driving other devices. of Raspberry Pi.
The Raspberry Pi family was born from a desire
> Raspberry Pi OS
to encourage more hands-on computer education A guided tour of Raspberry Pi
> Raspberry Pi Camera
around the world. Its creators, who joined together Unlike a traditional computer, which hides its
Module (optional)
magpi.cc/camera to form the non-profit Raspberry Pi Foundation, inner workings in a case, a standard Raspberry Pi
had little idea that it would prove so popular: the has all its components, ports and features out on
few thousand built to test the waters in 2012 sold display – although you can buy a case to provide
out immediately, and more than 50 million have extra protection, if you prefer. This makes it a
been shipped all over the world in the years since. great tool for learning about what the various parts

50 magpi.cc Get to know your Raspberry Pi


TUTORIAL

A. GPIO header
B. Wireless
C. RAM
D. RP1 I/O controller chip
E. Connector for fan
F. USB 2.0G
G. USB 3.0
H. Ethernet port
I. Power-over-Ethernet (PoE) pins
J. CSI/DSI camera/display port 0
K. CSI/DSI camera/display port 1
L. Micro HDMI 1
M. Connector for UART serial port
N. System-on-chip
O. Micro HDMI 0
P. Real-time clock battery header
Q. USB Type-C power in
R. Power button
S. Connector for PCI Express (PCIe)

of a computer do, and also makes it easy to learn


what goes where when it comes time to plug in
While it may look like there’s an
the various other pieces of hardware – known as overwhelming amount packed into
peripherals – you’ll need to get started.
When you’re using a Raspberry Pi with this such a tiny board, a Raspberry Pi
book extract, try to keep it oriented the same way
as in the pictures; otherwise it can get confusing is very simple to understand
when it comes to using things like the GPIO header
(detailed in Figure 1). T Figure 2: Raspberry Pi’s system-on-chip (SoC)
While it may look like there’s an overwhelming
amount packed into such a tiny board, a Raspberry
Pi is very simple to understand – starting with its
components, the inner workings that make the
device tick.

Raspberry Pi’s components


Like any computer, Raspberry Pi is made up of
many components, each of which has a role to play
in making it work. The first, and arguably most
important, of these can be found just to the left of
the centre point of the board (see Figure 2), covered
in a metal cap: this is the system-on-chip (SoC).
The name ‘system-on-chip’ is a great indicator
of what you would find if you prised the metal
cover off: a silicon chip, known as an integrated
circuit, that contains the bulk of Raspberry Pi’s
system. This integrated circuit includes a central
processing unit (CPU), commonly thought of as the
‘brain’ of a computer, and a graphics processing
unit (GPU), which handles the visual rendering and
display output side of things.

Get to know your Raspberry Pi magpi.cc 51


TUTORIAL

S Figure 3: Raspberry A brain is no good without memory, however,


Pi 5’s random access and just above the SoC you’ll find exactly that:
memory (RAM)
a small, black, plastic-covered rectangular chip
X Figure 6: Raspberry Pi’s
power management (Figure 3). This is Raspberry Pi’s random-
integrated circuit access memory (RAM). When you’re working on
(PMIC)
Raspberry Pi, it’s the RAM that holds what you’re
doing. Saving your work moves this data to the
more permanent storage of the microSD card.
Together, these components form Raspberry Pi’s
volatile and non-volatile memory: the volatile
RAM loses its contents whenever Raspberry Pi Another black chip, smaller than the rest, can be
loses power, while the non-volatile memory in the found a little bit above the USB C power connector
microSD card keeps its contents. at the bottom left of the board (Figure 6). This is
At the top left of the board you’ll find another known as a power management integrated circuit
metal lid covering the radio, the component that (PMIC); it takes the power that comes in from
Raspberry Pi the ability to communicate wirelessly the USB C port and turns it into the power your
with devices (Figure 4). In fact, the radio itself Raspberry Pi needs to run.
fills the role of two other common components: a The final black chip, below RP1 and positioned
Wi-Fi radio that connects to computer networks; at a jaunty angle, helps the RP1 in handling
and a Bluetooth radio that connects to peripherals Raspberry Pi’s Ethernet port. It provides what is
like mice and sends or receives data from nearby known as an Ethernet PHY, providing the physical
smart devices like sensors or smartphones. interface which sits between the Ethernet port
Another black, plastic-covered chip marked with itself and the Ethernet controller in the RP1 chip.
the Raspberry Pi logo can be found on the right Don’t worry if this seems like a lot to take in:
side of the board, near the USB ports you don’t need to know what each component is
(Figure 5). This is RP1, a custom I/O controller or where to find it on the board in order to use
chip which communicates with the four USB ports, Raspberry Pi.
the Ethernet port, and most low-speed interfaces T Figure 4: Raspberry
Pi’s radio module
to other hardware.

S Figure 5: Raspberry Pi’s RP1 controller chip

52 magpi.cc Get to know your Raspberry Pi


TUTORIAL

Pi’s PCI Express (PCIe) bus: a high-speed interface


for add-on hardware like Solid State Disks (SSDs).
To use the PCIe bus, you’ll need the Raspberry
Pi PCIe HAT add-on to convert this compact
S Figure 15: Raspberry Pi’s GPIO header connector to a more common M.2-standard PCIe
slot. You don’t need the HAT to make full use of
At the bottom left of the board is a USB C power Raspberry Pi, though, so feel free to ignore this
port (Figure 13), used to provide Raspberry Pi with connector until you need it.
power through a compatible USB C power supply. At the top edge of the board are 40 metal pins,
The USB C port is a common sight on smartphones, split into two rows of 20 pins (Figure 15). These
tablets, and other portable devices. While you pins make up the GPIO (general-purpose input/
could use a standard mobile charger to power your output) header, an important feature of Raspberry
Raspberry Pi, for best results you should use the Pi, that lets it talk to additional hardware from
official Raspberry Pi USB-C Power Supply: it’s LEDs and buttons all the way to temperature
better at coping with the sudden changes in power sensors, joysticks, and pulse-rate monitors.
requirements that can occur when your Raspberry There’s one final port on Raspberry Pi, but
Pi is working particularly hard. you won’t see it until you turn the board over.
Here on the underside of the board you’ll find a
microSD card connector positioned almost exactly
At the top edge of the underneath the top-side’s connector marked
‘PCIe’ (Figure 16). This connector is for Raspberry
board are 40 metal pins Pi’s storage device: the microSD card inserted in
here contains all the files you save, all the software
At the left edge of the board is a small button you install, and the operating system that makes
facing outwards. This is Raspberry Pi 5’s new power your Raspberry Pi run. It’s also possible to run
button, used to safely shut down your Raspberry your Raspberry Pi without a microSD card by
T Figure 16: Raspberry
Pi when you’re finished with it. This button is not loading its software over the network, from a USB Pi’s microSD card
available on Raspberry Pi 4, or older boards. drive, or from an M.2 SSD. connector
Above the power button is another connector
(Figure 14), which, at first glance, looks like a
smaller version of the CSI and DSI connectors. This
almost-familiar connector connects to Raspberry

S Figure 14: Raspberry Pi’s connector for PCI Express.

Get to know your Raspberry Pi magpi.cc 55


TUTORIAL

W Figure 8: Raspberry
Pi’s Ethernet port
T Figure 7: Raspberry
Pi’s USB ports

Raspberry Pi’s ports


Raspberry Pi has a range of ports, starting with
four Universal Serial Bus (USB) ports (Figure 7)
at the middle and top of its right-hand edge.
These ports let you connect any USB-compatible
peripheral – like keyboards, mice, digital cameras,
and flash drives – to your Raspberry Pi. Speaking
technically, there are two types of USB ports on
Raspberry Pi, each relating to a different Universal
Serial Bus standard: the ones with black plastic
inside are USB 2.0 ports and the ones with blue
plastic are newer and faster USB 3.0 ports.
Next to the USB ports is an Ethernet port, also
known as a network port (Figure 8). You can use
this port to connect your Raspberry Pi to a wired
computer network with a cable that uses what is
known as an RJ45 connector. If you look closely
at the Ethernet port, you’ll see two light-emitting
diodes (LEDs) at the bottom. These are status
lights which, when lit or blinking, let you know
the connection is working.
Just to the left of the Ethernet port, on the
bottom edge of Raspberry Pi, is a Power-over-
Ethernet (PoE) connector (Figure 9). This
connector, when paired with the Raspberry Pi 5
PoE+ HAT – Hardware Attached on Top, a special
add-on board designed for Raspberry Pi – and
a suitable PoE-capable network switch, lets you
power Raspberry Pi from its Ethernet port without
having to connect anything to the USB Type-C
connector. The same connector is also available
on Raspberry Pi 4, though in a different location;
Raspberry Pi 4 and Raspberry Pi 5 use different
HATs for PoE support. S Figure 9: Raspberry Pi’s Power-over-Ethernet connector

Get to know your Raspberry Pi magpi.cc 53


TUTORIAL

T Figure 12: Raspberry Pi’s micro HDMI ports

S Figure 10: Raspberry


Pi’s camera and Directly to the left of the PoE connector are a
display connectors pair of strange-looking connectors with plastic
T Figure 11: Raspberry flaps you can pull up; these are the camera Between the two micro HDMI ports is a small
Pi’s camera module
and display connectors, also known as the connector labelled ‘UART,’ which provides access
Camera Serial Interface (CSI) and Display Serial to a Universal Asynchronous Receiver-Transmitter
Interface(DSI) ports (Figure 10). (UART) serial port. You won’t use that port in this
You can use these connectors to connect a book extract, but you may need it in the future for
DSI-compatible display like the Raspberry Pi communicating with, or troubleshooting, more
Touchscreen Display or the specially designed complex projects.
Raspberry Pi Camera Module family (Figure 11). To the left of the micro HDMI ports is another
You’ll learn more about camera modules and small connector labelled ‘BAT’, where you can
display ports in this month’s MIPI connect a small battery to keep Raspberry Pi’s
tutorial (see page 70). Either port real-time clock (RTC) ticking, even when it’s
can act as a camera input or display disconnected from its power supply. You don’t need
output so you can have two CSI to connect a battery to use Raspberry Pi, though,
cameras, two DSI displays, or one CSI since it will automatically update its clock when
camera and one DSI display running turned on, so long as it has access to the internet.
on a single Raspberry Pi 5.
To the left of the camera and
display connectors, still on the bottom
edge of the board, are the micro
High Definition Multimedia Interface
(micro HDMI) ports, which are smaller
versions of the connectors you can find
on a games console, set-top box, or TV
(Figure 12). The ‘multimedia’ part of its
name means that it carries both audio and
video signals, while ‘high-definition’ means
you can expect excellent quality from both
signals. You’ll use these micro HDMI ports
to connect Raspberry Pi to one or two display
devices, such as a computer monitor, TV, or
projector. S Figure 13: Raspberry Pi’s USB Type-C power port

54 magpi.cc Get to know your Raspberry Pi


TUTORIAL

X Figure 18: The ports


are found at the rear
of Raspberry Pi 400

Raspberry Pi 400
Raspberry Pi 400 takes the same components as
Raspberry Pi 4, including the system-on-chip
and memory, but places them inside a convenient
keyboard housing. As well as protecting the
electronics, the keyboard housing takes up less comes pre-installed in Raspberry Pi 400. To
room on your desk and helps keep your cables tidy. remove it push gently on the card until it clicks
While you can’t easily see the internal and springs out, then pull the card the rest of the
components, you can see the external bits and way out. When you put the card back in, make sure
pieces, starting with the keyboard itself (Figure the shiny metal contacts are facing downwards.
17). In the upper right corner are three light- Push the card in gently until it clicks, which means
emitting diodes (LEDs): the first lights up when it’s locked into place.
you press the Num Lock key, which switches some The next two ports are the micro HDMI ports,
of the keys to act like the ten-key number pad on used to connect a monitor, TV, or other display.
a full-size keyboard; the second lights up when Like Raspberry Pi 4 and Raspberry Pi 5, Raspberry
you press Caps Lock, which makes the letter keys Pi 400 supports up to two HDMI displays. Next to
upper-case rather than lower-case; and the last these is the USB C power port, used to connect an
lights up when Raspberry Pi 400 is powered on. official Raspberry Pi Power Supply, or any other
At the back of Raspberry Pi 400 (Figure 18) compatible USB C power supply. The two blue
are the ports. The left-most port is the general- ports are USB 3.0 ports, which provide a high-
purpose input/output (GPIO) header. This is the speed connection to devices like solid-state drives
same header shown in Figure 15, but flipped: the (SSDs), memory sticks, printers, and more. The
first pin, Pin 1, is at the top-right, while the last white port to the right of these is a lower-speed
pin, Pin 40, is at the bottom-left. USB 2.0 port, which you can use for the Raspberry
Next to the GPIO header is the microSD card Pi Mouse included with the Raspberry Pi 400.
slot. Like the slot on the underside of Raspberry The final port is a gigabit Ethernet network port,
Pi 5, this holds the microSD card that serves as used to connect Raspberry Pi 400 to your network
storage for Raspberry Pi 400’s operating system, using an RJ45 cable as an alternative to using the
applications, and other data. A microSD card device’s built-in Wi-Fi radio.

X Figure 17: Raspberry


Pi 400 has an
integrated keyboard

56 magpi.cc Get to know your Raspberry Pi


TUTORIAL

T Figure 19: Raspberry


Pi Zero 2 W

Raspberry Pi Zero 2 W
Raspberry Pi Zero 2 W (Figure 19) is designed
to offer many of the same features as the other
models in the Raspberry Pi family, but in a much
more compact design. It’s cheaper and draws less
power, but it also lacks a few ports found on the
larger models.
Unlike Raspberry Pi 5 and Raspberry Pi 400,
Raspberry Pi Zero 2 W lacks a wired Ethernet port.
You can still connect it to a network, but only
using a Wi-Fi connection.
You should also notice a difference in the
system-on-chip: it’s black instead of silver
and there’s no separate RAM chip visible. This
is because the two parts – SoC and RAM – are
The Official Raspberry Pi
combined into one chip, marked with an etched Beginner’s Guide
Raspberry Pi logo, and placed roughly in the
middle of the board. This extract is taken from The Official Raspberry Pi Beginner’s Guide 5th Edition.
This 290-page book is packed with guidance on how to set up your Raspberry Pi,

Raspberry Pi Zero 2 W is install its operating system, and start using this fully functional computer.
With this book, you can start coding projects, with step-by-step guides using

designed to offer many of the Scratch 3, Python, and MicroPython programming languages.
Plus you’ll experiment with connecting electronic components, and have fun

the same features as the creating amazing projects. You can buy a copy from our online store, or read it in
the Bookshelf app in Raspberry Pi OS.

other models
magpi.cc/beginnersguide

The far left of the board has the usual microSD


card slot for storage, and below that is a single
mini HDMI port for video and audio. Unlike
Raspberry Pi 5 and Raspberry Pi 400, Raspberry Pi
Zero 2 W only supports a single display.
To the right are two micro-USB ports: the left-
hand port, marked ‘USB’, is a USB On-The-Go
(OTG) port which is compatible with OTG adapters
to connect keyboards, mice, USB hubs, or other
peripherals; the right-hand port, marked ‘PWR
IN’, is the power connector. You can’t use a power
supply designed for Raspberry Pi 4 or Raspberry
Pi 400 with Raspberry Pi Zero 2 W, since they use
different connectors.
At the very right of the board is a Camera Serial
Interface you can use to connect a Raspberry Pi
Camera Module.
Finally, Raspberry Pi Zero 2 W has the same 40-
pin general-purpose input/output (GPIO) header as
its bigger siblings, but it’s supplied unpopulated.
This means it doesn’t have any pins fitted. If you
want to use the GPIO header you’ll need to solder
a 2×20 2.54mm pin header in place — or purchase
the Raspberry Pi Zero 2 WH, which has a header
already soldered into place.

Get to know your Raspberry Pi magpi.cc 57


Twin-lens reflex: Old school cool
TUTORIAL

TUTORIAL

Twin lens re e
Old-school cool
Get started with vintage Yashica cameras

V
intage cameras are a bit like like the Yashica TLR, practically modular. Accepting
vintage cars. The older they are, the a 120 (or 127) film to take a total of twelve 6 cm
fewer things there are to go wrong. square exposures, the Yashica TLR is capable of
When they do go wrong, the easier taking absolutely stunning photographs.
they are to fix. In this article, you’ll At their simplest level, film cameras all have
take a look at a classic twin-lens the same very basic design. A lens of some type
Dr Andrew Lewis reflex (TLR) camera, see the common problems they focuses light through a shuttered aperture for a
Dr Andrew Lewis is a
acquire over time, and hopefully see why it’s worth certain amount of time, projecting an image onto
specialist fabricator the effort of getting them back into good working a sheet of light-sensitive chemicals. Everything
and maker, and is the order. You’ll also see how modern technology, like else about a camera is a design feature – lenses or
owner of the Andrew
Lewis Workshop. Raspberry Pi Pico, can be used to help with the pinholes, winding mechanisms, mechanical shutters,
repair process, and learn a few old-school tips that timers, film size, and viewfinder types are all
will help you take good photographs. essentially design choices made by the manufacturer
or the end user. In most cameras, these things get
GRAIN NOT PIXELS wound together into a package and sold to the end
The TLR style of camera is a design classic. It’s user as a complete item that can’t really be changed.
simple, easy to maintain and, in the case of cameras A few very expensive (think ‘did I just pay more for a

5868 magpi.cc Twin-lens relex: Old-school cool


TUTORIAL

FORGE

Left
Camera mechanisms
are a bit like watches
or clocks to work
with. Have a look at
some watch repair
videos to get an idea
of how to keep parts
ordered and what
tools to use for the
job. Be aware that
there are springs
inside the shutter, and
they are liable to y
off into the wilderness
at the slightest ick
of a screwdriver. Be
very careful, and work
somewhere clean

FIXING LENSES
The lenses of the Yashica TLR camera are glued
together using a blend of tree sap and turpentine called
camera than a car?‘ type of expensive) cameras have
Canada balsam. Over time, variations in temperature
an impressive range of interchangeable parts, but it’s and pressure can cause these lenses to separate and
rare for a moderately priced camera to be modular leave flecks or mist between the lens elements that will
or even moderately hackable to the extent that the affect the quality of the photographs you take. Fixing this
Yashica TLR is. problem isn’t as difficult as you might imagine, and there
Below
If you’re lucky, you can find a Yashica TLR for sale are a few different ways you can do it depending on the To remove the front
tools you have access to and your confidence level. assembly of a Yashica
at around £60, although it’s likely that it’ll be faulty TLR, you need to
and will need some work to get going. With the CLEAN. LUBE. ADJUST
remove the leather
from the front and
flexibility of the Yashica TLR, it’s probably going to One method is to use heat to remelt the balsam and undo the four screws
be much easier to fix than you might think. The main then apply pressure to the lens while it cools. This can that hold it in place.
Removing the rest of
be done by hand with gloves, a heat-resistant foam the screws will allow


pad, and a wooden stick with a felt end. Separate the you to get to the
lens from the camera, and heat it using a temperature- lenses and shutter
If you’re lucky, you can find controlled heat gun until you see the balsam melt, then
mechanism

just push the two lenses together. Get comfortable


a Yashica TLR for sale at before you start because this is a slow process, and
around £60, although it’s you need to heat the elements gradually and evenly,


then apply steady pressure for several minutes while
likely that it’ll be faulty the elements cool slowly. Allowing the elements to cool
too quickly can cause them to shatter. If this process
doesn’t work for you, you can instead remove the
existing balsam using a solvent like Xylene, and glue
areas you’ll be looking at when you’re assessing a the lenses back together using a modern lens glue.
TLR camera are the lenses and focusing systems, If the lenses are not fully separated but are clouded
the film winder, and the shutter. The cosmetics of or spotted internally, applying some heat will help get
the camera don’t really affect its function, but the them apart. How the balsam reacts to the heat seems
condition of the light seals does need to be checked to be partly down to the method of balsam application
originally used, so mileage may vary with different
and they should be replaced if they’re worn out.
lenses and you’ll need to experiment to find the best
The camera’s lenses screw into the lens assembly method for your particular lens. A quick internet search
and into the shutter. One problem to watch out on the subject will provide some additional methods and
for is that the top viewfinder lens and the bottom specific glues to consider.
shutter lens both need to be screwed into place by

Twin-lens relex: Old-school cool magpi.cc 6959


Twin-lens reflex: Old school cool
TUTORIAL

TUTORIAL

Right
The parts of a Yashica
camera are pretty
much discrete, but
there are points where
different parts interlock
with each other, like
the shutter and the
winder mechanism, or
the dials on the face
of the camera. Keep
an eye out for these
interlocks, and make
sure you put them back
in the right place when
you’re reassembling
things. As always,
plenty of photographs
will help you

the correct amount or the viewfinder image won’t


OPEN AND SHUT be a true representation of the image in focus. If
the camera you’re fixing has been knocked around
There are a few things that can go wrong with the a lot, it’s possible for a lens to shift and knock the
Yashica TLR camera shutter. General poor maintenance
camera out of focus. The easiest way to set this is
can lead to the shutter getting stuck or running at the
wrong speed, and that’s easy enough to fix with a little to remove the back and front cover of the camera
bit of solvent and some TLC. The question is, how do and set up a film spool with a piece of greaseproof
you check that your camera is firing accurately? A quick paper the same width as a piece of 120 film wound
and easy way is to make a simple light detector with onto it. Lock the camera in place using a tripod or
a Raspberry Pi Pico, and use it to check how long the
shutter lets light into the camera.

BEWARE OF THE SELF DESTRUCT


There’s an innocuous-looking lever on Yashica
TLR cameras, with an X and an M mode. This lever
can break your camera so badly that you’ll need to
disassemble the shutter mechanism to get it working
again. The lever adjusts the shutter to synchronise
with the firing of the flash. Normally, this lever is
set to X, which is the correct setting for a standard,
instantaneous modern electronic flash. The M mode
adjusts the shutter firing time to allow some extra time
for old-style flash bulbs to reach their peak. When the
camera is in M mode, the self-timer can not be used. In
a normally working, well-maintained camera, it shouldn’t
be possible to set the self-timer when the camera is in
M mode. However, most old cameras are not in peak
condition and the mechanism that is supposed to stop
that happening doesn’t work properly. If you fire that
QUICK TIP self-timer while the camera is in M mode, you’re going
The rotational to be doing the camera equivalent of gear-shifting a car
orientation of lens from forward to reverse, at speed, without using the
pieces relative clutch. In short, you’ll need to completely disassemble Above
the shutter and crank mechanism, reset all of the parts, Connect an LDR and 10 kΩ resistor, as shown in the diagram,
to each other is and then place the LDR inside the camera behind the shutter.
important. Don’t and then go and have a bit of a lie-down. Most people Close the back of the camera as well as you can to prevent light
take them apart lock the lever into position using a small screw or a leaking in from the back, and use a simple MicroPython program
to time how long the shutter stays open when the button is
without marking their well-positioned elastic band. pressed. If the shutter is running slow, then you probably need to
alignment first. clean and lubricate the shutter mechanism

6070 magpi.cc Twin-lens relex: Old-school cool


Beware
while it’sof Yashicato
possible
cameras120
re-wrap thatfilm
useonto
127
a 127film – it hasn’t
spool, it’s a
been
fiddly manufactured
job.
TUTORIAL
commonly since
the mid-1990s, and
while it’s possible to
re-wrap 120 film FORGE
onto
a 127 spool, it’s a
fiddly job.

QUICK TIP
Beware of Yashica
cameras that use
127 film – it hasn’t
been manufactured
commonly since
the mid-1990s, and
while it’s possible to
Left
re-wrap 120 film onto
The Yashica MAT LM
a 127 spool, it’s a
has a built-in light
fiddly job.
meter, although it isn’t
actually very good. If
you aren’t bothered
about maintaining
a pristine factory-
Left
standard camera, you
The Yashica the
can remove MATlight
LM
has a built-in
meter light a
by removing
meter,
few although it isn’t
screws
actually very good. If


you aren’t bothered
some well-placed heavy objects, turn the focus knob about maintaining
a pristine factory-
to its lowest point, and place a distinctive object If you really want the standard camera, you
exactly one metre away from the camera lens. With can remove the light

no macro lenses fitted, the camera should have a


camera to stand out, meter by removing a
few screws
minimum focus of one metre. With the greaseproof you can replace the leather


some loaded
‘film’ well-placed
into the
heavycamera,
objects,
set turn
the shutter
the focus to knob QUICK TIP
with something different


to itsmode
bulb lowest and
point,
holdandit open
placesoa that
distinctive
you can object
see If you really want the There are specific
exactly
the sceneoneinmetre
front of
awaythe from
camera theprojected
camera lens. ontoWith
the
no macro lenses
greaseproof paper.
fitted,
Lookthe at the
camera
projected
shouldimagehave a
camera to stand out, low viscosity oils and
specialist greases
minimum
and checkfocus
whetherof one
it’s metre.
in focus. With
If it the
isn’t,
greaseproof
you can you can replace the leather produced for optical
‘film’ loaded
adjust the focus
intoby
thescrewing
camera, the set bottom
the shutterlensto in or When it comes to cosmetics, it’s amazing how devices, and these
with something different QUICK TIP


bulb Now
out. modelookandathold
theitviewfinder
open so that screen,
you canandseecheck much a bit of black Sharpie, a chrome touch-up pen, exist for a reason.
Left
There
WD-40
The are
andspecific
Yashica sewing
MAT LM
the scene
that the viewfinder
in front ofimage
the camera
is also projected
in focus. Ifonto it isn’t,
the and some wax polish can accomplish. A couple of
lowaviscosity
has oils and
built-in light
machine oil are
greaseproof
screw or unscrew
paper.the
Look topatlens
the of
projected
the camera image until hours of cleaning and applying subdued paint effects meter, although it isn’t
specialist greases
not an acceptable
actually very good. If
and image
the check resolves.
whether it’s Holdin the
focus.
threads
If it isn’t,
in place
you with
can a can make the camera look almost new, and if you produced
substitute.
you for optical
aren’t bothered
adjust
dab of the
lacquer
focusorby
glue.
screwing
Your camera
the bottomshould lens
now in be
or really
When want
it comes
the camera
to cosmetics,
to stand out,
it’s amazing
you can how
replace devices,
about and these
maintaining
a pristine factory-
out. Nowwell
focused lookenough
at the viewfinder
for generalscreen,
use. and check much
the leather
a bit of
with
black
something
Sharpie,different.
a chrome touch-up pen, exist for a reason.
standard camera, you
that the viewfinder image is also in focus. If it isn’t, and some wax polish can accomplish. A couple of WD-40
can and the
remove sewing
light
meter
machineby removing
oil are a
screw or unscrew the top lens of the camera until hours of cleaning and applying subdued paint effects few screws
not an acceptable
the image resolves. Hold the threads in place with a can make the camera look almost new, and if you 71


substitute.
some
dab ofwell-placed
lacquer or glue.
heavyYour objects,
cameraturn should
the focus
now knob
be really want the camera to stand out, you can replace
to its lowest
focused well point,
enough and forplace
general
a distinctive
use. object If you
the leather with reallydifferent.
something want the
exactly one metre away from the camera lens. With
068-071_HS#74_TUTORIAL_Vintage Camera_NK_DH_AG.indd 71
no macro lenses fitted, the camera should have a
camera to stand out, 30/11/2023 16:33

minimum focus of one metre. With the greaseproof you can replace the leather 71
‘film’ loaded into the camera, set the shutter to QUICK TIP
with something different


bulb mode and hold it open so that you can see
There are specific
the scene in front of the camera projected onto the
068-071_HS#74_TUTORIAL_Vintage Camera_NK_DH_AG.indd 71 lowtutorial
This viscosity is oils
fromand
30/11/2023 16:33
greaseproof paper. Look at the projected image specialist greases
HackSpace magazine.
and check whether it’s in focus. If it isn’t, you can produced
Each issue for opticala
includes
adjust the focus by screwing the bottom lens in or When it comes to cosmetics, it’s amazing how devices,
huge andofthese
variety maker
out. Now look at the viewfinder screen, and check much a bit of black Sharpie, a chrome touch-up pen, exist forinside
projects a reason.
and
that the viewfinder image is also in focus. If it isn’t, and some wax polish can accomplish. A couple of WD-40of
outside andthesewing
sphere
screw or unscrew the top lens of the camera until hours of cleaning and applying subdued paint effects ofmachine
Raspberryoil are
Pi, and
not has
also an acceptable
amazing
the image resolves. Hold the threads in place with a can make the camera look almost new, and if you substitute.
tutorials. Find out
dab of lacquer or glue. Your camera should now be really want the camera to stand out, you can replace more at hsmag.cc.
focused well enough for general use. the leather with something different.

Twin-lens relex: Old-school cool magpi.cc 7161


TUTORIAL

Upcycle
a Sonos Play:1
If you’ve got a broken or unused Sonos speaker
sulking in the corner, it’s possible to upcycle it for
many different purposes using Raspberry Pi

U pcycling and the right to repair are


hot topics right now. Just because an
electronic device has failed, or is no longer
required, it shouldn’t mean instant landfill.
When we came across a sad Sonos Play:1 that was
went for Raspberry Pi OS Lite (64 bit) and wrote
the image to an SD card using Raspberry Pi
Imager, making sure Wi-Fi and SSH access were
configured in advance as, once in the enclosure,
we won’t have keyboard or video access. Once
more of a ‘Silence:1’, we decided to investigate installed, make sure you can get SSH access over
the possibility of repurposing the high-quality your network then run sudo apt update -y & sudo
speaker and enclosure. The result was a new apt upgrade -y so that everything is up to date.
PJ
MAKER

lease of life with plenty of options within its


Evans
capabilities. This tutorial shows how to do it and
PJ is a writer, is not just for a Play:1, but more of an example of
software engineer how you can give dead tech a new purpose.
and tinkerer. His
Play:1 now plays
endless Rick Astley.

mastodon.social/
Build your stack
@mrpjevans
01 Let’s start with Raspberry Pi itself. We
selected a 3A for this project thanks to its smaller
form factor which means it doesn’t get in the
way of the main speaker in the unit. You could
also use a Raspberry Pi Zero 2. There are many
choices for audio output, but the one thing you
need is amplification. Most DAC HATs are line-out
only, relying on external amplification, so make
sure yours can be wired directly to speakers. The
Danger! Sonos Play:1 speaker is 4 Ohm so we selected a
High voltage. matching amp: in this case, the Justboom DAC &
AMP combo. Assemble everything according to
Many Sonos products instructions, and from now on use the 20V power
have direct mains input S The original Sonos Play:1. A powerful speaker assembly in a small
which means residual supply connected to the HAT to power everything. good-looking unit. Lucky for us there’s a lot of space inside!
charge can be present
on the circuit board.

magpi.cc/dischargecap

Prepare the operating system Disassemble your Sonos Play:1


02 As is traditional in these tutorials, it’s 03 Let’s create some space for the Raspberry
operating system time. Depending on your plans, Pi and the amp. Carefully remove the rubber strip
it’s your choice whether you have a desktop on the base that hides the screws. Now remove the
or not (VNC into a speaker? Why not?) but we Torx screws. Lift out the base then slide the speaker

62 magpi.cc Upcycle a Sonos Play:1


TUTORIAL

You’ll Need
> Sonos Play:1 (or similar)

> Amp HAT


(magpi.cc/amp4)

> 20V (at least 12V)


power supply with
barrel connector
(magpi.cc/20v4a)

> Approx 1m speaker-


grade wiring

> 20V wiring (optional)

> Size 5 and 6 Torx


screwdrivers

> Rotary tool and


3mm bit

Raspberry Pi & HAT Driving


the speaker is a Raspberry
Pi 3A and Justboom DAC
& AMP combo HAT

The amplifier is
connected directly
to the speaker and
tweeter, nothing
else needed

grille off. Remove the tape from each corner to


reveal the screws holding the top section and
especially the contacts to the motherboard.
Carefully remove the wiring loom to the speakers Top Tip
remove them. Pop off the top section and detach then unscrew the board. Remove the board by the
the ribbon cable from the mainboard. Now remove edges. Ideally, at this point you should discharge Ice cube trays
the remaining screws to carefully separate the front the capacitors for safety. See the guide in the are your friend
section from the back. For a complete guide, see warning box. Either way, discard the mainboard
There are a lot
this iFixIt article (magpi.cc/play1mb). at this point unless you intend to recycle it. of bits you need
to keep track of
during disassembly.
Consider using
an ice cube tray
Remove the mainboard Clear out the wiring
04 IMPORTANT: This part involves 05 At this point you should have a plain
to keep things
separate and in
order of use.
potentially harmful electricity. Minors must be metal backplate to the whole enclosure. This
supervised. Take a look at the mainboard on the is where the Raspberry Pi and amplifier will be
rear part of the enclosure. See the three brown installed. Turning our attention to the main
capacitors? They are likely to be holding charge section, you’ll see some wiring still installed. We
from the mains electricity. Do not touch them, need to remove all of this. Start by looking at the

Upcycle a Sonos Play:1 magpi.cc 63


TUTORIAL

X The Justboom DAC


& AMP is a DAC HAT
with an amplifier that
‘piggybacks’ on top to
create a single device

X Here you can see


the original PCB for
the Sonos system.
The large brown
capacitors may be
carrying high voltage
charges and should
not be touched

Configure the DAC


07 Let’s return to the Raspberry Pi. With the
speakers connected, boot up and get a command
line prompt either directly or via SSH. At this point
the DAC & amp are unknown to the operating
system, so we need to make some changes.
Instructions vary for different DACs. For Justboom,
we need to edit config.txt to load the drivers at
boot time. Run this command:

sudo nano /boot/config.txt

Find the line dtparam=audio=on and comment it


out and add the lines below so it matches:

speaker terminals. The wiring loom is connected #dtparam=audio=on


using spades, and we can reuse those, so using dtparam=audio=off
needle-nose pliers, remove the terminals. Make dtoverlay=justboom-digi
sure you note which are positive and negative;
they are different sizes and we want to make sure CTRL+X to save, then Y to exit. Reboot now
we reattach using the same polarity. Finally, clip with sudo reboot.
out the smaller wires near the base which are no
longer required.

Test time!
08 Let’s make some noise! White noise to be
Build the new wiring
06 Time to heat up the soldering iron.
exact. Get back to a command prompt and first
let’s check the volume levels. Enter alsamixer
Clip off the spades from the original wiring and you’ll see some controls. Use the arrow
(which can now be discarded). Make sure the keys to move along to “Digital” and turn it up
speaker wire you have chosen is a suitable size to about 50%. If you see “MM” there press M
to fit in the screw terminals of the amplifier. to unmute the channel. Press ESC to leave. Now
Now, matching the original polarity, take a decent run this command:
length of speaker wire (you can trim it later)
and solder to the main speaker spades, then using speaker-test -c 1
a 10cm additional strip, solder the tweeter spades
to the main spades so they are in parallel. Silver If all is well, you’ll hear a static-like sound
the opposite end of the wire and screw into the from the speakers. Lightly press your fingertip
+ and - terminals of the amplifier for the left against each speaker to feel the vibration. When
channel. Once connected, return the spades to you’re happy both are working, use CTRL+C to
their original terminals. stop playback.

64 magpi.cc Upcycle a Sonos Play:1


TUTORIAL

T The back of the unit


Top Tip
with the Raspberry
Pi stack installed. All
that’s left is to wire it
Not just
to the speakers Sonos
This project isn’t just
that can hold a chassis-mount barrel socket (files for a Sonos Play:1.
here: magpi.cc/play1socket). Then you can create How about rescuing
a link between the socket and another connector an old vintage radio
or hi-fi unit?
internally. Now the power supply is no longer
tethered to the Sonos Play:1.

Reassemble
11 Before getting the screwdriver back out,
make sure everything is still working as expected
and there’s no chance of any short circuits when
the unit is put back together. If you have too much
slack on the speaker lead, now is the time to trim
it down and re-silver. You should have enough
that you can easily open up the two halves of the
enclosure should you need to. Now reverse the
earlier process. Reattach the backplate to the main
body, add on the top piece, slide on the speaker
grille and then the base and its rubber strip.

Mounting the Raspberry Pi


09 Final test
Examining the Sonos Play:1 backplate
we encounter a bit of luck. The top two screw 12 Once everything is back together it’s time
terminals are exactly the same width apart as the for a final test run. Power up the upcycled unit,
standard Raspberry Pi mounting holes. Hurrah! It’s make sure you can get a Wi-Fi connection (despite
not all plain sailing though. They are M.3 size and the thick casing, we’ve found the Wi-Fi to remain
the Raspberry Pi holes are M2.5. So if you’re feeling reliable - of course there’s nothing to stop you
brave, use a low-speed rotary tool with a 3mm using a wired connection if you prefer). Run the
bit to carefully bore out the two holes to M.3 size. speaker test again, altering the volume if you need
Note: You can permanently damage your Raspberry to. You may have noticed a potential problem.
Pi at this point, take your time. Now, using the We’ve only got one speaker connected to the left
screws from the original board, you can mount the channel? Don’t we have stereo in 2024? Well, yes
stack to the backplate. It’s a good idea to line the and we need to mix the two channels and also find
surface with insulation tape to avoid short circuits. a cool application for our new audio toy. That’s for
next month.

W When testing,
use alsamixer to
Power wiring
10
control volume

We’ve been using the 20V power supply as


the standard Raspberry Pi 5V supply isn’t enough
to drive the amplifier as well. Now the original
mainboard has been removed, there is a space
previously occupied by the Ethernet connector
that can be used to feed the power through to
the board. If you’re feeling fancy and have the
kit, consider 3D printing a cover for the aperture

Upcycle a Sonos Play:1 magpi.cc 65


TUTORIAL

Raspberry Pi
MIPI CSI/DSI
connectors
Connecting cameras and displays
to Raspberry Pi 5’s new connectors

Alasdair
T he CSI and DSI ports found on previous
models of Raspberry Pi have been
combined into two dual-purpose CSI/DSI
(MIPI) ports on Raspberry Pi 5. These now use
work with Raspberry Pi Camera modules, and
not the display. To this end, the cables have
“CAMERA” printed on them
MAKER

Allan a denser connector pinout, previously only found


on Raspberry Pi Zero and the CM4IO board. You
Alasdair Allan
is a scientist, can connect two displays, two cameras, or one
author, hacker, camera and one display to these ports.
and journalist. In
the past, he has
mesh-networked
the Moscone
Attaching cameras
01
Center, caused a
US Senate hearing,
There is no configuration necessary
and contributed
to the detection of for Raspberry Pi devices like cameras (magpi.
what was – at the cc/camera). If you plug a camera into either
time – the most MIPI connector you will get an appropriate
distant object
yet discovered in CSI connection, and your camera will be made S A camera cable connected to the MIPI connector

the universe. available to the OS.


magpi.cc/docs

Attaching a display
Camera cables 03
02 There are three Flat Flexible Cables (FFC)
If you are using our 7-inch Touch Display
with Raspberry Pi 5, it will not automatically
available to connect CSI cameras to Raspberry Pi 5: be configured. You will need to add one of the
following two lines to your /boot/firmware/config.
Top Tip • 200mm camera cable standard-to-mini txt file. Attaching the display to the CAM/DISP 1
• 300mm camera cable standard-to-mini connector, you should add:
Update first • 500mm camera cable standard-to-mini
dtoverlay=vc4-kms-dsi-7inch
At the time of These camera adapter cables have a 22-way
writing, to get touch
support on the 0.5mm-pitch connection at one end (for Raspberry Alternatively, by attaching it to the CAM/DISP 0
7-inch Touch Display Pi 5), and a 15-way 1mm-pitch connector at the connector you can add the following line:
you will need to use other (for your camera). You can buy Raspberry
rpi-update to get a
Pi 5 camera cables from The Pi Hut (magpi.cc/ dtoverlay=vc4-kms-dsi-7inch,dsi0
newer kernel.
camcable5). Note that these cables will only

66 magpi.cc Raspberry Pi MIPI CSI/DSI connectors


TUTORIAL

The CSI/DSI ports are identical


MIPI (MIPI (Mobile Industry
The Camera and Display sockets
Processor Interface) ports
are marked CAM/DISP 0 and 1.
You can plug cameras and displays
into either (or both) ports

You’ll Need
> Raspberry Pi 5

> Camera or Display


cable
magpi.cc/camcable5
magpi.cc/dispcable5

> Raspberry Pi Camera


or Display
magpi.cc/camera
magpi.cc/display
There is no configuration necessary for
Raspberry Pi devices like cameras

Available display cables Using non-Raspberry Pi devices


04 There are three Flat Flexible Cables (FFC) 05 If you are using a non-Raspberry Pi MIPI
available to connect DSI displays to Raspberry Pi 5: device – either a camera or a display – it will not
be automatically configured for your Raspberry


200mm display cable standard-to-mini
300mm display cable standard-to-mini
Pi 5. Instead, you will need to add a dtoverlay
setting into the /boot/firmware/config.txt file Top Tip
• 500mm display cable standard-to-mini to correctly configure the right port for the
camera or display. Higher density
Like the camera cables, these cables have a 22-way These dtoverlay settings should be provided by
The Compute
0.5mm-pitch connection at one end (for Raspberry the manufacturer of your device. For example, Module cable
Pi 5), and a 15-way 1mm-pitch connector at the adding dtoverlay=ov9281 would configure an adapters can be
other for your display. You can buy the cables from Omnivision OV9281-based camera on CSI/DSI1, used to connect
standard cables to
The Pi Hut (magpi.cc/dispcable5). The cables will while adding dtoverlay=ov9281,cam0 would add the higher-density
have “DISPLAY” printed on them. the same camera to CSI/DSI0. mini connectors.
See schematics
(magpi.cc/
cmcdaschematics)
and design files
(magpi.cc/
cmcdadesign).

W The camera cables


have a 22-way
0.5mm-pitch
connection for
Raspberry Pi 5 #
and a 15-way 1mm-
pitch connector
at the other (for
your camera)

Raspberry Pi MIPI CSI/DSI connectors magpi.cc 67


FEATURE

#MonthOf
Making 2024
genius contraptions
Get making in March and share
your progress with the community!
By idle inventor Rob Zwetsloot

I
t’s that time of the year again: #MonthOfMaking. A time when we want
the community at large to make something and show it off. Whether you’ve
never touched a resistor in your life or you’re a pro with welding, nobody
and nothing is off limits for #MonthOfMaking.
During March we’re encouraging you to make your dreams a reality with
your ultimate Raspberry Pi or Pico-based project. To that end, we’ve dug up
some of the most over-the-top builds we could find – true Rube Goldberg
machines that make use of Raspberry Pi technology to create the kind of
useful chaos only homemade creations can achieve.
So fetch your Doc Brown wig, double-sided tape and some prototyping wire,
and let’s get inventing.

The rules of #MonthOfMaking


> Work on a project, new or old

> Take photos of your progress and completed projects

> Share it to social media with a helpful description

> Make sure to include the #MonthOfMaking hashtag

> That’s it!

68 magpi.cc #MonthOfMaking 2024 – genius contraptions


FEATURE

Rube Goldberg
machines
Who is Rube and why do we
keep making machines for them?

E
ven if you don’t know the term for
them, you very likely have seen a Rube
Goldberg machine in cartoons, movies,
or splashy adverts. They refer to elaborate,
automated machines that perform a task – usually
a simple one – with over the top chain-reaction They’re named after an American cartoonist,
mechanisms. Think a candle burning through a famous for the weird and wonderful contraptions
piece of string that releases a hammer to strike a in his comics, though British cartoonist W Heath
ball into a tube that deposits the ball on a pulley Robinson did the same thing earlier. Powerhouse
system to lift up a blind. In an era before everything was part of the
Internet of Things, weird gizmos that could turn In many Merrie Melodies
on a light remotely or put your toast on were great and Looney Tunes
fantasy fair, and the more elaborate and inefficient cartoons, whenever a
the funnier. Cartoons of the 1930s and ’40s would complex contraption
often make use of them for fun animated effect, or factory line is
the board game Mouse Trap is based on the concept, being illustrated, the
and many inventions in Wallace and Gromit are song Powerhouse by
also very Rube Goldberg-esque. the Raymond Scott
S One of Rube Goldberg’s more famous early contraptions is this
The concept lives on to this day, with silly Quintette was used
Self-Operating Napkin machines going viral on all social media to set the rhythm and
platforms as they use more varied and ridiculous atmosphere. It was
ways of performing these simple tasks. usually a rearranged
version by legendary
composer Carl Stalling,
and is still used in
cartoons to this day.
You can listen to the
original recording here:
magpi.cc/powerhouse

W The classic board


game Mouse Trap has
you build an elaborate
device to capture
S In the 1955 Tom and Jerry short ‘Designs on Jerry’, Tom dreams
a mouse – perhaps
of becoming rich with his elaborate ‘better mouse trap’
inspired by the Tom &
Jerry cartoon?

#MonthOfMaking 2024 – genius contraptions magpi.cc 69


FEATURE

Eccentric
engineering
inspiration
Build a better mouse trap, or just a very elaborate
way to turn on a light.

Rube goldberg machine


to turn on a light
INVENTOR
ntewinkel | magpi.cc/rubelight

YOU NEED TO TURN ON A LIGHT SWITCH,


BUT IT’S WAY OVER THERE!
A woodpecker toy activates a robot arm, which
places a steel ball on a marble maze. This then
runs through the maze and lands on some
electrical contact points, which are used to move
a robot worm, which in turn jostles a robot
excavator to press start on the app for an Elegoo
car. This car pushes in a plug, which turns on a
robot, which then asks Alexa to turn the light on.
Alexa complies.

 We recommend watching the full video.

S The full device makes use of old and new technology, a perfect and efficient marriage

70 magpi.cc #MonthOfMaking 2024 – genius contraptions


FEATURE

T Maybe not as large as your typical Rube Goldberg machine,


but it’s definitely a very complex way of reading a book

Sh*tty Dice Rolling,


Dot-Counting Robot
INVENTOR
DelfinGuy | magpi.cc/diceroller

YOU NEED TO MANUALLY ROLL SOME DICE AND


READ THE OUTCOME
This moving rig was created out of recycled
cardboard, and can be flipped up and down by a
BrickPi Bookreader 2 servo motor to manually roll some dice.
A Raspberry Pi Camera Module is set in a
INVENTOR position to read the dice when they settle, then
Dexter Industries | magpi.cc/brickbook2 computer vision is used to count the pips on the
dice, and even keep a tally.
YOU NEED TO TURN THE PAGES OF A PAPER BOOK TO We love the upcycling and recycling involved
MAKE IT INTO AN AUDIOBOOK with this project.
This contraption was built using BrickPi – a way
for Raspberry Pi to interact with LEGO Mindstorms
– and uses a wheel turn the book’s pages, while
a Raspberry Pi Camera Module uses OCR (optical
character recognition) to read the text on the page,
which is then converted into an audio file.
As the name suggests, this is the second iteration
of Bookreader – the first one was able to read the
text on an ebook reader, and included a mechanism
to press the ‘next page’ button on the device. We’re
not sure if that, or using a tyre to turn the pages, is
more silly. S No human could possibly count the outcome of the dice here

S The full contraption, made with cardboard, paper clips,


S The tyre requires a lot of precision in its movement duct tape, coat hangers, and some electronics

#MonthOfMaking 2024 – genius contraptions magpi.cc 71


FEATURE

The Swirl Machine


INVENTOR
KPS3 | magpi.cc/swirlmachine

HOW DO YOU CREATE WINE ART?


A robot arm picks up a piece of paper, and then
sticks it to a rig. It then fills up a glass of wine
(to a user-specified amount) with a pump, and
then spins it really really fast (also user-specified)
on a motorised spinning platform. The wine will
then splash on the paper, which the robot arm
will take to a final station where it’s
photographed and analysed to determine
the user’s personality.
This was a marketing stunt for a
winery, and unfortunately this machine
is no longer operational. We can assure
you it was very cool and funny to see in
action though.

W Our art from the time the machine was running. We


S The full device is thankfully contained in a perspex box to limit can’t remember how it determined out personality
the amount of wine spillage but it was probably ‘very cool and funny’

Robot Arm Clock


INVENTOR
Hendrik Ohrens | magpi.cc/roboarm

YOUR CLOCK HAS BROKEN


This time machine uses a robot arm to manually
move the hands of the clock as time passes.
Raspberry Pi keeps it ticking, and makes sure the
hand is moved at the right time. The googly eye is
very important, so that you can humanise the robot
helping you keep time.
The robot arm is custom made with 3D-printed
parts, and has had lengthy training to properly
move the hands. S A custom 3D printed
robot arm, making use of
Raspberry Pi and Arduino
W How clocks worked before
the creation of this robot
arm, nobody knows

72 magpi.cc #MonthOfMaking 2024 – genius contraptions


FEATURE

T The CD’s eject motor gets a workout by pushing food into the
mouth of a hungry cup/hamster

Hamster feeding
CD-ROM
INVENTOR
Akkie | magpi.cc/akkiecd

YOUR HAMSTER IS HUNGRY


This controls a CD drive with a Raspberry Pi to
remotely activate the eject command. As the tray
moves out, it pushes a load of hamster food into
a receptacle. Akkie is well known for his ejecting
CD drive tricks – he had it ring a bell for new year,
turn on an air conditioninig unit whose remote has
broken, and he would wear one that was remotely
controlled by his smart phone on a hard hat. What
did it do on his hat? Eject.

Safety first! Build your skills Where to share!


When building ridiculous Every build can be a Posting on Instagram, Threads, or Mastodon with the hashtag
contraptions, make sure to learning experience. While #MonthOfMaking is the best way to share your builds.
stay safe. Good inventors have we’ve definitely felt the Otherwise, we’ll be making posts on our Facebook page that
gear like safety glasses, gloves disappointment of a project you can comment on with images, and if you don’t do any
and face shields, and don’t not quite working, you can social media you can always email us.
mess with mains electricity. If always learn from your
Facebook > facebook.com/MagPiMagazine
you’re under 18, get a parents mistakes and failures. It’s all
help with any power tools. part of learning how to make! Mastodon > magpi.cc/mastodon

Threads > @magpimagazine

Instagram > @magpimagazine

Email > [email protected]

#MonthOfMaking 2024 – genius contraptions magpi.cc 73


PLAY
& CODE
GAMES!
RETRO GAMING WITH

RASPBERRY PI 3 RD E D I T I O N
Retro Gaming with Raspberry Pi shows you how to set up
Raspberry Pi 5 to play a new generation of classic games. Build your
gaming console and full-size arcade cabinet, install emulation software
and download original games with our step-by-step guides. You’ll
discover a vibrant homebrew scene packed with new games for original
consoles and legal access to all those retro games you remember!

Set up Raspberry Pi
for retro gaming
Emulate classic
computers and consoles
Learn to code
retro-style games
Build a console,
handheld, and full-size
arcade machine

BUY ONLINE: magpi.cc/store


REVIEW

NVMe Base
SPECS Pimoroni magpi.cc/nvmebase From £14 / $14

FEATURES
Works with Give your Raspberry Pi 5 a major storage speed boost
most NVMe
M.2 SSDs; Flat with this PCIe M.2 SSD adapter. By Phil King
flex PCIe cable;

T
Standoff kit; 4 ×
rubber feet he NVMe Base enables you to connect an of Raspberry Pi 5 using the supplied standoff kit
NVMe (non-volatile memory express) – demonstrated in Pimoroni’s installation video
CONNECTIONS solid-state drive to Raspberry Pi 5’s PCIe (magpi.cc/nvmebaseyt) – you’ll want to insert
M.2 Key slot, slot for storage with far faster read/write speeds your NVMe SSD stick into the Base’s M.2 key slot.
PCIe slot (18-pin) than a microSD card. The board is long enough to accommodate 2280
Rather than coming in the HAT form factor to size SSDs, and has mounting holes for this plus
sit on top of Raspberry Pi, it fits underneath, hence 2230, 2242, and 2260 drives – so you can secure it
T The NVMe Base
the “Base” moniker. This means it doesn’t obstruct with a bolt and nut.
comes with a a cooling fan, if you’re using one, nor tie up the
standoffs kit, flat
flexible PCIe cable,
GPIO pins, so you can still add another HAT on top. Securing the Base
and four rubber feet Before attaching the NVMe Base to the underside The next step is to attach M2.5 standoffs to the
top of the Base using the four mounting holes.
The kit helpfully includes both short and long
bolts – the latter are useful if you want to securely
mount another HAT on top of Raspberry Pi 5.
Connecting the Base’s PCIe slot with the one on
Raspberry Pi 5 is done using a small, flat S-shaped
cable that flexes and has labels to help you orient
it correctly – the end for the Base is slightly
wider, at 18 pins. It’s easier to connect Raspberry
Pi 5’s PCIe slot first, then the Base’s, due to the
latter’s less fiddly flip tab. You can then fold

S The slimline NVMe Base fits snugly under Raspberry Pi 5, secured


by bolts and standoffs

76 magpi.cc NVMe Base


REVIEW

T A short flexible cable


connects the NVMe
Base to Raspberry Pi
5’s PCIe slot

We achieved a write speed of 514MB/s


and a read speed of 858MB/s

T The underside of the


NVMe Base board,
secured to Raspberry
Pi 5 with bolts and
standoffs

the flexible cable over so the Base is underneath


Raspberry Pi 5 to form a sandwich, before using a
small screwdriver and bolts to secure it. The only
downside is that the extra height means it won’t
fit in a standard case.
With the hardware installed, you’re ready to
start using your SSD… that is, once you’ve checked
that your system is up to date and you have the
latest bootloader version selected in raspi-config: In our tests, using the dd command, we achieved
Advanced Options > Bootloader Version > Latest, a write speed of 514MB/s and a read speed of
then select ‘No’ and reboot. The drive should then 858MB/s. While far from our SSD’s maximum
appear in the /media directory, and be shown (due to only using one of its PCIe lanes), it’s still
by the lsblk command. If not, make sure it is many times faster than microSD (typically around
formatted (you can use Raspberry Pi Imager). 30MB/s write, 90MB/s read), and also better than

Drive compatibility
an SSD connected via speed-limiting USB. Check
out Pimoroni’s own tests on various SSDs at
Verdict
While the majority of NVMe M.2 drives should work magpi.cc/nvmebasetests. A slimline adapter
fine, Pimoroni’s product page notes that a few You’ll want to make Raspberry Pi 5 boot from that sits neatly under
Raspberry Pi 5 and
models have quirks or have proved troublesome. the SSD instead of the microSD card. This is easily
enables fast PCIe
The safest option is to choose a tested model listed achieved by writing the OS to it with Raspberry read/write speeds
there, or purchase the NVMe Base bundled with a Pi Imager and then selecting Advanced Options > with a suitable SSD.

9
compatible 250GB or 500GB SSD. Boot Order > NVMe in raspi-config. For our drive,
Raspberry Pi 5 officially only supports the Gen this cut around four seconds from the average

/10
2.0 version of PCIe, but adding an extra line to boot time. We also noticed that some apps, such as
/boot/config.txt will force Gen 3.0 for extra speed. Chromium, seemed a little snappier.

NVMe Base magpi.cc 77


REVIEW

Argon ONE V3
M.2 NVME Case
Argon40 magpi.cc/argononev3 £40 / $49
SPECS

COMPONENTS: Argon’s legendary case gets a Raspberry Pi 5 upgrade with built-in


Argon ONE Pi 5 V3
case, M.2 NVME NVMe storage capability. Lucy Hattersley builds her dream computer
carrier board,

A
Video/Audio
PCB extender rgon40 has made a name for itself cover that provides access to the M.2 NVMe socket.
(daughterboard), amongst the Raspberry Pi community by Here you can insert any M.2 NVMe with M-Key up
GPIO & Fan board, making high-quality cases that transform to 2280 size. The flap is marked “THERML” which
RP2040-based our favourite single-board into a professional- nods to its aluminium heatsink and a long strip
microcontroller looking computer, or a smart feature-packed of thermal pad is included to transfer the heat out
media player. into the case.
INPUT/OUTPUT This month we have the hotly anticipated Argon Two more silicon pads are included to connect
Adjustable M.2 ONE V3 M.2 NVMe PCIe Case. Hopes are high for Raspberry Pi’s CPU and PMIC (Power Management
NVME with M-Key this one and we can tell you it hits home runs all Integrated Circuit) to the case.
up to 2280 size, the way. Redesigned for Raspberry Pi 5 this board Alongside this impressive passive cooling
2 × standard combines the features of the Argon ONE V2 with is a redesigned 30mm fan and blower. This is
(type A) HDMI the – previously separate – M.2 Expansion Board repositioned at an angle to be “more efficient and
ports, Ethernet, add-on to create an all-in-one computer case quiet”, and we found it unobtrusive even when
4 × USB-A ports, with super-fast, and super-large, storage that also stress testing.
USB-C power cleverly uses passive cooling and heatsinks to keep Argon ONE V3 now sports Raspberry Pi’s RP2040
port, 3.5mm everything running. This is the one we have been microcontroller to control various functions like
audio jack waiting for. fan speed and power management (via jumper
pins on the daughter board). The power button
COOLING All together now is less of a novelty now that Raspberry Pi 5 itself
Aluminium alloy The Argon ONE is Argon40’s flagship case, features one. However, the presence of a 3.5mm
case for passive containing a daughterboard for Raspberry Pi audio jack will be a welcome addition for audio
cooling, blower that adds additional features such as full-sized buffs now that it has been removed from Raspberry
type PWM HDMI sockets and an infrared (IR) receiver. Pi 5’s main board.
programmable On the base of Argon ONE V3 is a removable One advantage over the Argon ONE V2 board is
30mm fan that the M.2 NVMe now connects directly to the
PCIe socket on Raspberry Pi 5. This leaves all four
USB-A sockets available.
A removable magnetic flap on top of the case
provides access to repositioned GPIO pins alongside
a handy pinout guide.

Assembly and testing


X Argon ONE V3 is a neat Putting together the Argon ONE V3 was a relatively
case made from a black
aluminium alloy that painless process thanks to the included assembly
helps dissipate heat instructions (magpi.cc/onem2man). Raspberry Pi

78 magpi.cc Argon ONE V3 M.2 NVME Case


REVIEW

W Underneath Argon ONE V3 is a removable thermal


heatsink to fit the M.2 NVMe drive. Here we can also see
the power button, full-sized HDMI slot, 3.5mm audio jack
and Raspberry Pi 5 ports

T Heat testing Raspberry Pi 5 inside the Argon ONE V3 showed


it took five minutes (300 seconds) to reach the
60°c point, where the fan started, and remained there for
the rest of the 15-minute (900-second) test. At no point
was speed throttled

5 is connected to the HDMI daughterboard, and the


PCIE cable is used to connect the bottom half of
the case to Raspberry Pi 5. Then the whole thing is
screwed together. Finally, the M.2 NVMe storage
is connected to the underside making it possible to
upgrade the drive without opening the whole case. of an uncooled Raspberry Pi 5 without a heatsink).
As with previous Argon ONE cases, the microSD We found the fan kicked in at the 60°c mark after
card is hidden away and can’t be used without five minutes and kept the Raspberry Pi 5 hovering
opening up the case. around 61°c for another
This is less problematic 10 minutes. At no point
these days as a USB
thumb drive flashed
An all-in-one computer did Raspberry Pi OS
reach the 80°c mark
with Raspberry Pi OS
can be used to run
case with super-fast, and where performance
throttling begins. It
Imager and flash the super-large storage compared favourably
storage drive. Attach to a Raspberry Pi 5
an Ethernet cable and an official Active
and you can also use Cooler unit.
Network Install with Raspberry Pi 5
(magpi.cc/networkinstall). Put it to use
Speed-testing of the NVMe drive tells you One optional extra we should mention is an internal
much more about the quality of your drive than Argon ONE BLSTR DAC audio board upgrade, which Verdict
the case itself. We used a 500GB WD Blue storage will be sold separately. Alongside the 3.5mm jack
stick and measured the speed using Raspberry Pi this will make Argon ONE V3 ideal for audio fans. An excellent case
that sees a lot of
OS’s built-in Raspberry Pi Diagnostics tool to test We didn’t have one for testing and can’t see it on Argon’s ideas reach
performance. It returned a sequential write speed the Argon40 website just yet, so hopefully that will fruition. Turn your
789590 KB/sec (790 MB/s) almost 80 times faster come down the line. Raspberry Pi 5 into
a smart desktop
than the recommended pass speed for a microSD All of this transforms Raspberry Pi 5 from a
computer, media
card. It’s fast. hackable board to a desktop computer. A role player, games
The heat test is also interesting. We used stress our favourite computer is increasingly fulfilling console or DAC
--cpu 4 and measured the output with with aplomb. The built-in infrared connection, audio player.

10
the script found at magpi.cc/thermaltesting for large storage, and full-sized HDMI connection
15 minutes. also ensure Argon ONE V3 becomes the perfect

/10
Raspberry Pi 5 inside the Argon ONE V3 case media player or home games console. This case
idles at around 54°c (down from the 65°c baseline is highly recommended.

Argon ONE V3 M.2 NVME Case magpi.cc 79


REVIEW

ED-HMI3020
EDATEC magpi.cc/edhmi3020 From £212 / $268

An industrial touchscreen panel powered by Raspberry Pi 5. By Phil King


SPECS

FEATURES
10.1-inch screen
with ten-point
touch input,
Raspberry Pi
with 4GB or 8GB
RAM, optional
front-facing
camera
W With a rugged housing
and Raspberry Pi on the
PORTS rear, this is no ordinary
2 × USB 3.0, touchscreen tablet

D
2 × USB 2.0, 1 ×
USB-C power, esigned for industrial settings, the well as 3.5mm headphone and mic jacks. The key
2 × micro-HDMi, EDI-HMI3020 touchscreen panel has a addition, however, is an M.2 socket. To access
Ethernet (with ruggedised housing with a well-protected it, you’ll need to unscrew Raspberry Pi 5 and the
optional PoE), Raspberry Pi 5 mounted on the rear, cooled case from the rear of the unit, then you can use
RS232 and passively with a heatsink. It comes in 7-inch the M.2 slot inside to add an NVMe 2230, 2242, or
RS485, M.2 SSD (1024×600 pixels) and 10-inch (1200×800) variants 2260 SSD.
socket (internal) with 4GB or 8GB or RAM. We tested out the 8GB,
10-inch model. Touch control
DIMENSIONS Our unit’s microSD card had Raspberry Pi OS
258 × 172 × Bookworm pre-installed with the drivers for the
39.6mm; 1000g You can use the M.2 socket ten-point touchscreen, which worked instantly

inside to add an NVMe upon bootup. As we’ve found with other Raspberry
Pi touchscreens, there’s no right-click functionality

2230, 2242, or 2260 SSD by default and we also couldn’t double-click files
to open them (so had to enable one-click opening
in the File Manager). There was no on-screen
While there’s no direct access to Raspberry Pi keyboard available either, though we managed

Verdict 5’s GPIO header via the case, the four USB ports
are exposed, along with the USB-C power socket,
to get one running with a workaround from the
Raspberry Pi forums: magpi.cc/bookwormkb.
A robust two micro-HDMI ports, microSD card slot, and an The EDI-HMI3020 also comes with an optional
touchscreen panel Ethernet port with optional PoE functionality. 8MP front-facing camera – a Camera Module V2
with well-protected An upgrade over the HMI3010 models, the – for video conferencing and suchlike, making it a
Raspberry Pi 5
HMI3020 adds RS232 and RS485 interfaces, as versatile touchscreen tablet.
mounted on the
rear and the option
to add an M.2 SSD.

8 /10
W Mounted on the rear,
Raspberry Pi 5 has its
main ports accessible
through the rugged case

80 magpi.cc ED-HMI3020
SUBSCRIBE AND

SAVE UP
TO

35% on the cover price

ISSUE #76

OUT NOW
hsmag.cc
RESOURCES

10 Amazing:
Raspberry Pi 5
accessories  Raspberry Pi 27W USB-C
Power Supply
Power up your Raspberry Pi 5 with these Maximum juice
excellent add-ons Raspberry Pi 5 can get a little power hungry, and this higher-capacity
PSU makes sure it’s always fed.

R aspberry Pi 5 has been out for a while now, which


means there are several add-ons and expansions for
it already. Along with the HAT+ specification we talked
about last issue (magpi.cc/138), we expect to see some great
new kit in the future. Here are ten of the best add-ons you can
magpi.cc/psu I £12 / $15

 Official case
get for your Raspberry Pi right now.
Officially safe
This simple case not only keeps your
Raspberry Pi nice and contained, it
also has a blower fan inside and a
removable lid to access the GPIO pins

magpi.cc/case I £10 / $13

 Raspberry Pi Camera Cable


Photo converter
To accommodate space on the board, Raspberry Pi 5 uses an
FPC connector for Camera Modules, so you’ll need a converter to get
an existing camera snapping pics

magpi.cc/fpccable I £1 / $1

 Raspberry Pi Active Cooler


Minimal cooling
A little clip on heatsink and blower that will keep your Raspberry Pi 5's
processors cool while still leaving full access to the board.

magpi.cc/activecooler I £5 / $6

82 magpi.cc Raspberry Pi 5 accessories


RESOURCES

 Raspberry Pi RTC Battery


Right on time
If you need precision timing on your Raspberry Pi 5 and cannot rely on an
internet connection, using this in conjunction with our tutorial from issue  NVMe Base
138 (magpi.cc/138) will help you out.
Add storage
magpi.cc/rtcbattery I £5 / $6 If you can’t wait for the official M.2 HAT+ then there’s always the
Pimoroni-made NVMe Base, which slots underneath.

magpi.cc/nvmebase I £14 / $18


 Pibow Coupe 5
Slimline case
An update to the original  KKSB Case
Raspberry Pi case line not only
protects a Raspberry Pi 5 but also Tablet vibes
has space for the active cooler, and This nifty case allows you to quickly and conveniently combine
access to the on-board ports. Raspberry Pi 5 with the official touchscreen so you can easily use your
Raspberry Pi 5 on the go.
magpi.cc/pibow5 I £10 / $13
magpi.cc/kksb5 I £35 / $44

 Argon ONE V3 M.2 NVME  Cover for Active Cooler


Beefy desktop Moderate protection
A powerful protective shell for Raspberry Pi that reroutes ports, gives A cool little acrylic cover for your Raspberry Pi Active Cooler, and for
access to the GPIO, and lets you install an M.2 NVMe SSD drive. some of your Raspberry Pi 5 too. It comes in several colours.

magpi.cc/argononev3 I £46 / $58 magpi.cc/coolercover I £3 / $4

Raspberry Pi 5 accessories magpi.cc 83


RESOURCES

Learn AI
with Raspberry Pi
Discover more about the hot topic of AI with these resources.
By Phil King

The Coming Wave


Mustafa Artificial intelligence is the hand, he argues, AI has great
AUTHOR

Suleyman current buzzword thanks to potential to diagnose diseases


the recent arrival of impressive and discover new drugs. It
Price:
£25 / $33 online tools such as ChatGPT, could also transform agriculture,
Google Gemini and Meta Llama. solve the climate crisis, and lead
magpi.cc/
comingwave You may well have played with to greater prosperity.
these chatbots, but AI can do a On the downside, AI may
lot more and has the potential also be used for nefarious
to change all of our lives – for purposes to unleash havoc on
good or bad. the world that may threaten
This brave new world is livelihoods and nation states.
explored in The Coming Wave Suleyman outlines ten steps
by Suleyman, the co-founder to help contain AI’s excesses
of the DeepMind AI company in the closing chapter of this
(now part of Google). On the one fascinating overview.

Further reading
Books to help MAKE YOUR OWN NEURAL is having on every aspect of our lives,
NETWORK and where it might go next.
you learn more With Python code examples, X magpi.cc/hwbook
about AI Tariq Rashid’s book gently guides
newcomers through the world of ARTIFICIAL INTELLIGENCE
neural networks inspired by the FOR HUMANS
human brain. Free on GitHub, Jeff Heaton’s trilogy
X magpi.cc/makeneural gives a practical introduction to AI,
covering fundamental and nature-
HELLO WORLD inspired algorithms, deep learning,
Professor Hannah Fry has written a and neural networks.
fascinating book about the impact AI X magpi.cc/aiforhumans

84 magpi.cc Learn AI with Raspberry Pi


RESOURCES

Introduction to Machine
Learning and AI
Raspberry Pi Available via edX for free (or examples to get hands-on.
AUTHOR

Foundation paid with optional certificate), The first week introduces AI


this four-week course was and machine learning and what
Price:
Free created by the Raspberry Pi they can be used for, such as Online
courses
Foundation in collaboration data classification.
magpi.cc/edxrpiai
with Google DeepMind and Week two covers what
“aims to help young people problems AI can solve, preparing
understand how data for machine learning, and
AI works and how potential problems. The third Enrol in an AI web
it is changing the week delves into the machine course today
world”. learning process, supervised
Each weekly learning including decision trees
module comprises and nearest neighbour, and
a mixture of unsupervised and reinforcement
text and video learning. The final week covers
resources, along the workings of neural networks
with a few practical using nodes and connections.
SELF-DRIVING CARS
WITH DUCKIETOWN
Build your own wheeled robot
and use AI and computer vision

Beginning Artificial
to get it to drive autonomously
around a ‘Duckietown’

Intelligence with
miniature city.
X magpi.cc/duckietown

the Raspberry Pi AI FOR EVERYONE


This free course on Coursera is
Donald J Norris If you want to get hands- easy to follow for newcomers,
AUTHOR

on using AI in Raspberry Pi mainly comprising videos.


Price:
£28 / $30
projects, this book is a great Topics include building projects
starting point. While it’s a little and the impacts of AI.
magpi.cc/
beginaibook old now (2017) and some code X magpi.cc/aieveryone
libraries used are deprecated, games, including strategy
it covers the basics from a classic Nim.
practical perspective. Further chapters cover – in ARTIFICIAL INTELLIGENCE
After an overview of AI, it detail, with example projects NANODEGREE
introduces basic concepts such and Python code – fuzzy logic, A beginnner-to-intermediate
as Boolean algebra and inference. machine learning, neural programme from Udacity
The third chapter is where it networks, deep learning, that comprises six main
gets practical, offering some evolutionary computing, and courses covering topics
expert system demonstrations behaviour-based robotics. Some such as search methods and
that can be run on Raspberry Pi, of these projects involve using automated planning.
including animal identification. an ‘Alfie’ robot car – build X magpi.cc/udacityai
It then moves on to creating details are in an appendix.

Learn AI with Raspberry Pi magpi.cc 85


INTERVIEW

Tim
Stenning
The Raspberry Pi Store is filled with people knowledgeable and passionate
about what they do – including Tim, one of the original store employees

> Name Tim Stenning > Occupation Shop Floor Manager


> Community role Customer help > URL raspberrypi.com

T he Raspberry Pi
Store in Cambridge’s
Grand Arcade recently
celebrated being open for five
years – quite a feat for a store
“Not too long after Maplin
closed I was approached by my
manager [Oli Wilkin], who I had
helped with the closing of the
stores in Cambridge,” Tim tells
on since the opening of the first
store, I’m finding that I’m still
learning something new every
day on the job.”

T Tim joined the team


at SiliCon in San that started off life as a pop- us. “Remembering not having What kind of customers do you
Jose to help show up. One of the keys to its success the chance to look at Raspberry see at the store?
off what Raspberry
Pi Pico can do was bringing in experienced Pi at Maplin, and [it] being a We see customers from all
electronics retail staff from tech-centred experience, I took backgrounds and countries
the recently defunct Maplin, the opportunity and joined the visiting the store, from those
including Tim Stenning. team. Now, just over five years with no experience, families
looking to engage their children
with coding, to hobbyists,
tinkerers and die-hard makers.
[Aside from the pop-ups,] it’s
the only official Raspberry Pi
Store in the world. As you could
imagine this drew interest from
makers from all over the world.
One notable visit during our first
month open in 2019 was a couple
who flew in from South Africa
just to experience Raspberry Pi
in retail.

What are some of the most


frequently asked questions?
We get a variety of questions
every day, ranging from some
very common to very niche use
cases. Because of the wide variety
of different uses of Raspberry Pi
and its accessories, there’s never

86 magpi.cc Tim Stenning


INTERVIEW

S The store staff are very


friendly and can help you
find what you’re looking for

W The store has been around


for five years now – how
time flies!

T Don’t forget to pick up a


copy of The MagPi and
HackSpace magazine
when you’re in the store!

We get a variety of questions every


day ranging from some very common
to very niche use cases
any dumb or wrong questions, depending on individual needs.
and we always encourage people However, the one that stands out
to ask us questions. the most for me would be when
Some of the most common a visually impaired Raspberry
ones are: Pi fan and maker asked for
assistance with the products and
• What is a Raspberry Pi and guidance around the store.
what can you do with it? I was happy to oblige, and
• Can you play Minecraft walk the customer through the
/ Roblox / games on a store and provide explanations
Raspberry Pi? for the range of products
• Do you have Raspberry available. I’d like to think that
Pi CM4 / Zero / 3 / 4 / 5 the customer was provided with
models in stock? all the information they needed so many ways to take advantage
to get their project working. of the functionality of the
Do you have a good story cameras capabilities which
about helping someone out What’s you’re favourite only get better with the use
with a purchase? Raspberry Pi product? of Raspberry Pi 5. In-store,
There are a fair few stories as we My personal favourite official we’ve tested and demonstrated
try to be as inclusive as possible Raspberry Pi product would simple tasks like taking
to everyone visiting the store, and be the Raspberry Pi Camera pictures to more complex
try to provide assistance and the Module 3. With the use of the multiple camera setups, AI and
best recommendations possible Picamera2 library there are object recognition.

Tim Stenning magpi.cc 87


THIS MONTH IN RASPBERRY PI

MagPi
Monday 01
Amazing projects direct from social media!

E very Monday we ask the question: have you


made something with a Raspberry Pi over
the weekend? Every Monday, our followers
send us amazing photos and videos of the things
they’ve made.
Here’s a selection of some of the awesome things
we got sent this month. Remember to follow along
at the hashtag #MagPiMonday!

01. We get some great submissions on Mastodon from


serious tinkerers.
02. A cute way to use the video output capabilities of
Raspberry Pi Pico
03. We often think about making little clock assistants
to keep around the home, something like this
04. Combining hobbies is great, especially when you
can use a Pico to enhance your other hobby
05. A good upcycle of a lovely wooden box! We hope
the buttons can survive a foot press!
06. Editor Lucy might like this one – last we saw
her she was playing around with a MIDI key-
board to some success
07. For a first 3D print, this gets a big thumbs up
08. An interesting fusion! We hope the two play
nice together

02

88 magpi.cc #MagPiMonday
THIS MONTH IN RASPBERRY PI

04

03

06

05

08
07

#MagPiMonday magpi.cc 89
THIS MONTH IN RASPBERRY PI

Events in pictures:
Raspberry Pi Day
2023 in Cameroon FIND
OU T A
Community and official events in the wild M ON
TH’S
BOU T
EV EN N E X T
T S ON

R
PAGE
aspberry Pi Days are events run in 92
Cameroon for people to learn about and
discuss working with Raspberry Pi – this 02
event at the end of 2023 also allowed attendees
to experience Raspberry Pi 5 as well.

01. The event is held in a university classroom


02. Several Raspberry Pi 5 boards were present for
folks to have a look at
03. Different capabilities of Raspberry Pi are explored
in these events

03

01

90 magpi.cc Events in pictures


THIS MONTH IN RASPBERRY PI

Crowdfund this
Great crowdfunding projects this month

Doly PiWings 2.0


Billed as a companion robot, Doly uses a Raspberry Pi
Compute Module 4 and features a lot of open hardware and
software allowing you customise it as you wish. It’s a little
trundly robot with expressive eye screens. Its creator tells us
you’ll be able to upgrade it, and even use it for education.

SB Components is back with a new drone platform powered by


Raspberry Pi Pico that can also work with ESP32 S3. It includes
an integrated MPU6050 IMU which the creators say will allow
for accurate orientation and a smooth flight.

f magpi.cc/doly f magpi.cc/piwings2
YOUR LETTERS

Your
Letters
Image captions
We really enjoy our MagPi subscription - thanks for all the great
issues.
RAM check There’s a super-minor niggle that I’m hoping you can address
in future issues. In some (not all articles this year) you don’t
How do you check the RAM size of a Raspberry Pi, and label your photos. Now if it’s a graphic illustration fair enough,
what were the RAM variations released for Raspberry but increasingly we’re seeing unlabelled photos where it
Pi 3 Model B+? doesn’t make sense. Sometimes the photo is nonsensical (such
as a graph for ‘photon torpedos’ or ‘wibbly lines’), other times
Mahender via email the photos relate to the article but aren’t labelled to explain what
they are illustrating.
You’re in luck, for Raspberry Pi 3B+ only the 1GB version Usually, The MagPi labels the photos in articles, which is
was released. Multiple RAM types started with Raspberry also great for accessibility. Even when relevant photos aren’t
Pi 4, however there are also a couple of variations on available, if they are to be presented in the style of relevant
original Model B hardware. images, perhaps photos should have a ‘photo for illustrative
On Raspberry Pi 5 it will say on the board how much purposes only’ caption to save readers the time of trying to
RAM it has (there’s a little resistor soldered next to the figure out their significance.
number) and on other Raspberry Pi boards you can check
by opening the terminal and using:
Luke via email
$ cat /proc/cpuinfo
You’re absolutely right – the
This will give you a revision code, which you can check example you sent us was a case
against this list: magpi.cc/revcodes study that does not usually
have image captions for various
reasons, and the photos are just
illustrative. However sometimes
T The numbers on the board
represent the amount of RAM, an image might not get a caption
with a resistor soldered next because it was overlooked.
to the board’s onboard RAM
As you’ve mentioned,
picture captions are great for
accessibility across the magazine
and starting from next issue
we’re going to keep a closer
eye on our image labelling with S Like this image of a Raspberry Pi 5, all
this in mind. images should have a caption on them

92 magpi.cc Your Letters


USA SPECIAL!
6 ISSUES
Third birthday
I saw that Raspberry Pi was celebrating its third
birthday? I thought it came out in 2012?

Terry via Mastodon


FOR $43
Raspberry Pi was released on February 29 2012, so
the joke is that it only has a true birthday on leap
years – 2024 is the third leap year since it was
released, hence ‘third birthday’. It’s not like we
don’t celebrate it every year though.

FREE
RASPBERRY PI
S We do not recommend serving your
PICO W
Raspberry Pi board in this way.

Contact us!
> Mastodon magpi.cc/mastodon
>
>
Threads
Facebook
@themagpimag
magpi.cc/facebook
Subscribe online:
>
>
Email
Online
[email protected]
forums.raspberrypi.com
magpi.cc/subscribe
Email: [email protected]

Continuous credit card orders will auto-renew at the same price unless cancelled. A free Pico W is
included with all subscriptions. This is a limited offer. Not included with renewals. Offer subject to
change or withdrawal at any time.
EVENTS

Community
04

Events Calendar
Find out what community-organised Raspberry Pi-themed
events are happening near you…
01. CamJam’s Raspberry Pi Birthday Party 03. Raspberry Pi for Science Buskers
Saturday 2 March Friday 8 March
William Gates Building, Cambridge, UK Usap School, Harare, Zimbabwe
magpi.cc/cjrpbp magpi.cc/rpsb139
CamJam celebrates Raspberry Pi’s third (official) birthday! The Raspberry Pi for Science Buskers event provides high
The first ever Raspberry Pi computer was released 12 years school students with a rich and engaging set of activities
ago, but its birthday was February 29th! So while it’s 12 years related to the use of Raspberry Pi.
old, this is only the third time we have been able to throw it a The goals are:
proper bumper birthday party • To encourage them to use the Raspberry Pi in science
busking and projects.
02. Kanpur Raspberry Jam BIG • To promote a general interest in STEM among high
Birthday Weekend school students.
Sunday 3 March • To inspire the development of coding clubs in Zimbabwe.
MakerSpaceKanpur, Kanpur Nagar, India
magpi.cc/krj139
We’re celebrating Raspberry Pi’s birthday at this special
Jam. The topics are:
• Getting started with Raspberry Pi 5: Mr. Vivek & Himanshu FULL CALENDAR
• Sensors data using Raspberry Pi: Mr. Shivam & Hitanshu Get a full list of upcoming
• Raspberry Pi Pico Workshop: Mr. Harsh & Abhay community events here:
There will be lots of other tips and tricks by makers. magpi.cc/events
Please bring your Raspberry Pi or a charged laptop (either
one is required).

04. Raspberry Jam WV 2024


Saturday 16 March
University of Charleston, Charleston, WV, USA
magpi.cc/rjwv139
Join us for a fun-filled day at the University of Charleston in
Charleston, West Virginia. This in-person event is a must-
attend for all tech enthusiasts and lovers of Raspberry Pi
computers. Featuring the brand-new Raspberry Pi 5!

94 magpi.cc Community Events Calendar


EVENTS

01

02

03

RASPBERRY PI
EMBEDDED WORLD 2024
Embedded World
2024
> Where NuremburgMesse, Nuremburg, Germany
> When Tuesday 9 April to Thursday 11 April

“The Raspberry Pi team is looking forward to


returning to Embedded World in 2024. There you’ll
be able to meet us and experience demos of the
full spectrum of Raspberry Pi products, including
Raspberry Pi Pico, RP2040-based solutions, Compute
Modules, and Raspberry Pi computers, as well as the
High Quality Camera and Camera Module 3.”

magpi.cc/ew2024

Community Events Calendar magpi.cc 95


COMPETITION

WIN ONE OF FIVE


ARGON ONE V3
CASES!
The Argon ONE series of cases is one of our favourites – they’re
very sturdy, allow for excellent heat dissipation, and they look
very cool too. This new version has been created for Raspberry Pi 5
and we have five to give away.

Head here to enter: magpi.cc/win | Learn more: magpi.cc/argononev3

Terms & Conditions


Competition opens on 28 February 2024 and closes on 28 March 2024. Prize is offered to participants worldwide aged 13 or over, except employees of Raspberry Pi Ltd, the prize
supplier, their families, or friends. Winners will be notified by email no more than 30 days after the competition closes. By entering the competition, the winner consents to any pub-
licity generated from the competition, in print and online. Participants agree to receive occasional newsletters from The MagPi magazine. We don’t like spam: participants’ details will
remain strictly confidential and won’t be shared with third parties. Prizes are non-negotiable and no cash alternative will be offered. Winners will be contacted by email to arrange
delivery. Any winners who have not responded 60 days after the initial email is sent will have their prize revoked. This promotion is in no way sponsored, endorsed or administered by,
or associated with, Instagram, Facebook, Twitter or any other companies used to promote the service.

96 magpi.cc IN one of five Argon NE V3 cases!


NEXT MONTH

EDITORIAL
Editor

Learn to code with


Lucy Hattersley
[email protected]
Features Editor

Raspberry Pi
Rob Zwetsloot
[email protected]
Sub Editor
Ian Evenden

ADVERTISING
Charlotte Milligan
[email protected]
+44 (0)7725 368887

Turn your tech dreams into DESIGN


Head of Design
reality with Raspberry Pi Jack Willis
Designers
Sara Parodi, Natalie Turner
Illustrator
Sam Alder
Photographer
Brian O’Halloran

CONTRIBUTORS
Alasdair Allan, David Crookes, PJ
Evans, Garath Halfacree, Rosie
Hattersley, Phil King, Dr Andrew
Lewis, Ashley Whittaker

PUBLISHING
Publishing Director
Brian Jepson
[email protected]
Director of Communications
Liz Upton
CEO
Eben Upton

DISTRIBUTION
Seymour Distribution Ltd
2 East Poultry Ave,
London EC1A 9PT
+44 (0)207 429 4000

SUBSCRIPTIONS
Unit 6 The Enterprise Centre
Kelvin Lane, Manor Royal,
The Magpi #140 Crawley, West Sussex, RH10 9PE
+44 (0)1293 312193

On sale 28 March magpi.cc/subscribe


[email protected]

DON’T MISS OUT! magpi.cc/subscribe This magazine is printed on paper sourced


from sustainable forests and the printer
operates an environmental management
MASTODON magpi.cc/mastodon system which has been assessed as

Raspberry Pi 5
conforming to ISO 14001.
The MagPi magazine is published by

& Pico THREADS @themagpimag Raspberry Pi Ltd, 194 Cambridge Science Park,
Milton Road, Cambridge, England, CB4 0AB.
The publisher, editor, and contributors

Liquid cooling
accept no responsibility in respect of any
FACEBOOK magpi.cc/facebook omissions or errors relating to goods,
products, or services referred to or advertised
Raspberry Pi 5 in the magazine. Except where otherwise

EMAIL [email protected] noted, content in this magazine is licensed


under a Creative Commons

Program a Attribution-NonCommercial-
ShareAlike 3.0 Unported
ONLINE forums.raspberrypi.com
MIDI synth
(CC BY-NC-SA 3.0).
ISSN: 2051-9982.
THE FINAL WORD

Design updates
We’re now designing the magazine in house. It’s
Raspberry Pi through and through! By Rob Zwetsloot

D id you notice a difference in


the magazine this month?
We’ve made a big change in
how we make The MagPi as of this
issue, as we had the incredibly
several years ago – if you cast your
mind way back to issue 52 (magpi.
cc/52), there was a Christmas tree
on the cover. I had a grand plan of
showing people how to turn it into
From our great design team, to
our wonderful freelancers, our ads
manager, and many more people
who are part of the great chain that
results in a MagPi in your hands
talented art and design team at a Christmas card. We looked into each month.
Raspberry Pi put together the mag. having holes punched into the cover Why is it called a flannel panel?
They’ve been doing the cover for at the right spots but unfortunately Apparently nobody knows. I’ve never
us for a while now (it’s a very we weren’t able to make it happen, washed my face with it, at least.
important and involved step in
magazine production) and I’m really
happy with how this issue is turning
There is a lot of work that goes into
out thanks to the efforts of Sara, making each issue of the magazine
Nat, Jack, and Brian!
These are the folks that put from a lot of people behind the scenes
together all the packaging and
printed materials you see with so we had to recommend readers It’s important to be there though
official Raspberry Pi products, which poked their own holes in it – as while I am pretty incredible,
I always think is fantastic. To have something not every reader wanted there is no way I can make all of the
that expertise here on the magazine to do with their beautiful new issue. magazine myself – Adobe InDesign
makes me think we come off as just I believe some people did try the frankly scares me – and highlighting
that little more official. Christmas card tutorial in the end, the great people who support us
however the rest of the magazine is the least we can do (aside from
Past design was a bit heavy and it didn’t quite paying them for their work, which
We wouldn’t be where we are today work as I’d hoped. I’m glad we we do as well).
without the excellent team at Critical tried though. Anyway, I look forward to seeing
Media though – Lee, Sam, Dougal and more from our new team. See you
the many people who have worked on Creation is hard next month!
The MagPi in the past helped shape There is a lot of work that goes into
the look of the magazine and we’re making each issue of the magazine Rob Zwetsloot
AUTHOR

really proud of the top notch design from a lot of people behind the
Rob has been working on model kits a
we’ve managed to maintain since the scenes – if you look back to the lot recently. They’re a bit small to fit a
relaunch in 2015. previous page we have a thing called Raspberry Pi Pico, but he has a bigger
I also appreciate them trying a ‘flannel panel’ which credits kit in the pile to build…

to indulge me in a fun idea I had everyone who works on the mag. magpi.cc

98 magpi.cc Design updates


HIGHPI PRO
The new case from the HiPi.io team

Rapid tool-free assembly and disassembly Secure microSD card cover


Large internal volume for HATs VESA mount support
Compatible with Pi 2/3/4 Molding-configurable output ports
Multiple lid options customizable for volume orders
Passive & Active Cooling options Printed logo for your branding

Available at these great Pi stores:

Contact your favorite Pi store if it’s not listed here


PiKVM
Manage
Manage your
servers
servers or PCs
remotely!
remotely!

Remote control redefined

PiKVM V4 Mini
Small, cost-effective, and powerful!

Power consumption in idle mode: just 2.67 Watts!


Transfer your mouse and keyboard actions
Access to all configuration settings like UEFI/BIOS
Capture video signal up to 1920x1200@60 Hz
Take full control of a remote PC’s power

PiKVM V4 Plus
The most feature-rich edition

More connectivity
Extra storage via internal USB 3.0
Upgraded powering options
More physical security features
Extra HDMI output
Advanced cooling solution

A cost-effective solution for data-centers,


IT departments or remote machines!

Availableatatthe
Available themain
mainRaspberry
Raspberry Pi
Pi resellers
resellers

List of official
resellers by country:

You might also like