The MagPi issue 35 – next month we’re in print!

Issue 35 of The MagPi is here. It’s rammed full of projects, and features some of the most amazing builds and hacks we’ve seen so far this year. We’ve got 22 pages of step-by-step tutorials and the chance to win a beautiful Raspberry Pi robot (thanks to Dawn Robotics).


For me, the absolute highlight this month is Mike Cook’s sprinting game, which will have you building physical controllers you operate with jogging feet. This is something you’ll be able to put together as a fun physical computing project with friends or as part of an after school club or Raspberry Jam. Here’s Mike to demonstrate.

Your feedback on The MagPi has been fantastic, and we’re working to make it better every month. So far, we’ve had 100,000 downloads for issue 31 (we’ve had nearly 300,000 downloads overall since we started the new version of the magazine).

Screen Shot 2015-06-29 at 13.25.39

And we’ve got some news: next month, The MagPi goes into print. We are absurdly excited.

Russell "If I'd known you were taking photos I'd have shaved" Barnes

Russell “If I’d known you were taking photos I’d have shaved” Barnes

Russell Barnes, editor/Babbage owner, says:

The MagPi magazine has already proved itself to be one of the most successful new technology magazine launches of the year and I couldn’t be happier. It’s not every day that a digital magazine goes to print, but that’s exactly what we’re doing next issue. The Official Raspberry Pi magazine will be available throughout the UK and America, with plans to branch out into other territories and languages as soon as possible.

So here’s a date for your diaries: the print magazine is coming on 30th July.

The magazine will be even bigger and better than ever, with 100 pages of Raspberry Pi projects, tutorials features and reviews. You’ll be able to buy the magazine in store and online; in the UK it’s £5.99 UK. Other territories will vary.

The magazine will be available to buy in store from WHSmith, WHSmith Travel, Barnes & Noble and Micro Center, and all good newsagents. You’ll also be able to order a copy online from the Swag Store from July 30. 

Subscriptions are open now! If you want to be among the first people to receive the magazine you can subscribe today. You can get six issues of the magazine from £30 and 12 issues from £55. It’s available online by visiting, by calling +44 (1)20 258 6848, or by printing out the form on pages 28 and 29 of this month’s issue

Why subscribe?

  • Never miss an issue
  • Get it delivered to your door
  • Get it first (before it hits the shelves)
  • Save up to 25% on the cover price. 

The MagPi is (and always will be) free to download as a PDF. Russell says:

While we’ve been getting hundreds of requests for the magazine in print over the last six months, The MagPi has always been available as a Creative Commons-licensed PDF, and that’s the way it’s going to stay! You can download every issue of The MagPi from and you’ll soon be able to join a mailing list to get the issue delivered to your inbox every issue.

We hope you enjoy this month’s magazine as much as we enjoyed making it.


A chicken incubation system

As Chicken Week here at Pi Towers draws to a close, we are all thinking deep thoughts about roasting temperatures and the very best fillings for omelettes.


The eggs Dennis Hejselbak is working with are not for omelettes.

Dennis, who lives in Denmark, has built a Raspberry Pi-powered incubator, complete with camera. Chicken eggs take about 21 days to hatch, and today is day 11 of the incubation period, so if you keep an eye on the stream on his eggs page, you should be able to watch them hatch in ten days’ time.


When you’re hatching eggs, there are a few variables you’ll need to keep an eye on. There’s heat, which in this incubator is controlled by a light bulb (the box is polystyrene, so it’s well insulated) and an old CPU fan. Dennis needs to make sure the box is humid enough – that’s what the sponges are doing in the picture above, while a hygrometer attached to the Pi checks for humidity levels – and he turns the eggs manually two or three times a day, which is vital for a successful hatch. (He says that he’s hoping to automate the turning for the next batch of eggs he raises in this incubator.) Temperatures and humidity are captured on the live stream (this is a static image: click on the picture for the real stream on Dennis’ website).



Why would you build your own incubator? It’s much cheaper than commercial alternatives; you can add features like that camera; and the satisfaction you get out of building something like this yourself is enormous. This project is well within the grasp of schools: Dennis has made complete build instructions, with all the Python code and wiring schematics you’ll need available. (If you do start an incubator at school, make sure someone has access to the classroom at weekends to turn the eggs three times a day if you haven’t automated turning; chickens do not stop incubating outside school hours.)


Frankly, I’d rather like to start a chicken incubator at Pi Towers, but Emma has already forbidden office dogs, hamsters and anything more highly evolved than brine shrimp, so I’m guessing we may be out of luck.

This marks the end of Chicken Week.



Chickens redux

Regular readers with an interest in poultry will be all agog to find out what we’re posting about today; yesterday’s post covered a chicken coop with automated doors, and we promised more chickens today. (AND TOMORROW! It’s all chickens all the way down at Pi Towers this week.)

Darren Steele, a Pi owner from Lancashire, was faced with the same chickens/predators problem that Eric Escobar dealt with in yesterday’s post by mechanising the coop door, and programming it to shut after dark.

It turns out that a couple of years ago, Darren also automated his chicken coop to solve the same problem.

The way he automated it is perhaps not the first solution that might have sprung to your mind or to mine; but that’s why Darren got a spot on the BBC news and you and I didn’t.



Mechanise your chickens

My friend Tony always excuses himself early from parties, because he has to get home at dusk to shut his chickens in their coop. Tony, this one’s for you so that next time, you get to stick around for dessert.


Chickens are birds of habit. You don’t need to shepherd (bird-herd?) them into their coops when the sun goes down; they’re programmed to head to their perches as night falls. Foxes and other predators, unfortunately, take advantage of this to chew on stationary, sleeping chickens, so the door of the coop needs to be firmly closed once all the birds are roosting, and opened again at a repellently early hour in the morning. Usually a human will go and do that job. (When I was a kid, I had to do the same for our family’s ducks. I hated those ducks.)

Let’s face it: given a chance to exercise a bit of laziness, most of us will jump at it. (Metaphorically. Lazy people don’t like jumping.)

Eric Escobar has a very neat Pi-powered solution to the problem of night-time chicken imprisonment, which is safer than some others we’ve seen, which use linear actuators. This door’s lowered using gravity, so there will be no very, very, very slow and eventually deadly crushing of any chickens or small children with Eric’s setup. The door is programmed to be lowered at a certain time of day, once it’s dark enough for all the chickens to have moved indoors.

Everything you need to replicate it yourself, right down to schematics, is at Eric’s GitHub.

The nice thing about using a Pi for this sort of thing is that it enables a certain amount of feature-creep. Now the basic functionality’s there, Eric (or you) can add things like the ability to count chickens in and out of the coop; a camera; automated feeding…I’m trying to come up with a way to get the Pi to collect eggs, too, but I’ve got nothing. Ideas in the comments please!

Chicken-owners will be pleased to hear that we’ve got more chicken-husbandry content for you coming up tomorrow. And something that’s a bit like a chicken for Friday. We’re all about the poultry this week at Pi Towers.




A Big Year for Dwarf Planets

Liz: For us, one of the most powerful features of the Wolfram Language is the way it understands real-world (or, in this case, real-solar-system) objects, making it easy to incorporate data on all kinds of things into your projects. In this rather lovely instance from the good people at Wolfram, you can calculate and visualise the relative size of a number of those things on your Raspberry Pi, including the state of Texas, the dwarf planet Ceres, the former dwarf planet Pluto, and the Moon.

2015 is shaping up to be an interesting year in space exploration. For the first time, we will get up-close views of a dwarf planet. In fact, two different spacecraft will visit two different dwarf planets. The Dawn spacecraft is nearing its second primary target, Ceres, later this week. Later this year, the New Horizons spacecraft will visit Pluto.



Of course, related to all of this is the public controversy over the International Astronomical Union’s (IAU) “demotion” of Pluto from planet status. Regardless of your view on the matter, Pluto is still there, just as it always was, and nothing has changed concerning its existence. It doesn’t really matter what we call it. I won’t go into great detail to explain why Pluto was demoted, but we can use the Wolfram Language to explore some of the primary reasons.

One of the requirements for being labeled a planet according to the IAU definition is that the object must have cleared its orbit of other bodies. Planets have typically either absorbed or thrown out intruders so that they dominate their orbital zones. In the case of Ceres and Pluto, both bodies violate this requirement. Here is a graphic showing the orbit paths of Jupiter and Mars in orange, several large asteroids in blue, and the orbit of Ceres in red. As you can see, Ceres lies in the asteroid belt between Mars and Jupiter, along with many other objects, all classified as dwarf planets, asteroids, minor planets, or small solar system bodies, depending on your preference (or in the case of Ceres, by IAU definition).



A similar analysis can be done for Pluto. In the following example, you can see that all of the planets’ orbits (in orange) are relatively nice and concentric until you get to Pluto (in red), which crosses Neptune’s orbit. In addition, there are a number of other known “Plutoids” (in blue) that cross orbits with Pluto. And in fact, there are many more such objects. So if Pluto is a planet, then all of these objects, and many more, could potentially be declared planets, and that would be a nightmare for educational books to keep up with. The traditional question of “How many planets are there in the solar system?” becomes a large number that keeps growing as more objects are discovered.


Something else that is interesting to explore is size. Many people don’t really comprehend the sizes of Ceres and Pluto. The only size restriction provided by the IAU definition for a planet is that the body must be large enough for gravity to have pulled it into a spherical shape. This seems to be the case for both Ceres and Pluto, but this alone doesn’t make them planets. But it’s still interesting to visualize the sizes of these bodies by comparing them to something we are more familiar with. We can make use of GeoGraphics to put the size of these bodies into perspective. Here is a 2D map of the United States, with Texas highlighted in red. The inner disk represents the size of Ceres projected against Texas, the middle disk represents the size of Pluto, and the outer disk represents the size of our Moon. So the cross-section of Ceres is about the same size as Texas. Both Ceres and Pluto are noticeably smaller than our Moon.


With a bit more exploration, we can move this visualization into three dimensions by using texture mapping to move the above map onto a sphere.

First, we define a couple of geographic entities we will need:


Next, we use GeoGraphics to construct our 2D map and then convert it to an image:



Then we obtain several radius values we need, making sure they are all using the same units:



For positioning things, it’s useful to determine a center point for our map:



We need to position Ceres, Pluto, and the Moon near the center point of the map and offset them to appear as if they are sitting on the surface of Earth at that point:





We can apply the map as a texture on a sphere that represents the Earth using ParametricPlot3D:



Finally, we can combine the pieces and compare the sizes of Ceres, Pluto, and the Moon to the Earth:



In the coming days and weeks, the Dawn spacecraft will provide us with the first close-up views of the dwarf planet Ceres. Later this year when New Horizons passes Pluto, we will get our first close-up views of the more controversial member of this group of objects. Nothing we discover will result in Pluto being reinstated as a planet, as the reasons for its demotion are still there. But we will obtain more data on these small objects than has ever been gathered before, and it will give us a new understanding of these often under-appreciated members of our solar system. Dwarf planets are worthy of study regardless of what they are called.

Download this post as a Computable Document Format (CDF) file.


Skycademy – Free High Altitude CPD

We’re looking for 24 teachers (or youth leaders) to take part in a FREE two-and-a-half day Continuing Professional Development (CPD) event aiming to provide experience of high altitude ballooning to educators, and demonstrating how it can be used as an engaging teaching opportunity.

Over the last few year I’ve seen many awesome uses of the Raspberry Pi, but one of my favourites by far is seeing the Pi used as a payload tracker for High Altitude Ballooning (HAB) projects.

One of the most prolific HAB enthusiasts is Dave Akerman, who has launched many flights using the Raspberry Pi, from the first flight back in 2012

…to the launch of a potato for Heston Blumenthal’s “Great British Food”…

…and even capturing some amazing images of the recent Solar Eclipse from 30km up.

Many schools are also seeing the opportunities for learning that a HAB flight presents, incorporating physics, maths, computing and geography into one project.

Here’s a project from William Howard School in Cumbria, whose students built their own tracker connected to a Pi.

In my previous life as a teacher, I organised a launch with my own students, and we had help from Dave Akerman on the day. This turned out to be super helpful, as it takes some planning and there’s a lot to remember.

One of the hardest parts of running a flight is the number of different aspects you have to plan and manage. You can test the hardware and software to a certain point, but there’s limited opportunity for a practice flight. Having experience is really helpful.

For this reason we’re running our first “Skycademy”, during which we will be giving attendees hands-on experience of a flight. The event will be free to attend and will be spread over two and a half days between the 24th and 26th of August.

  • Day 1 – Planning and workshop sessions on all aspects of HAB flights.
  • Day 2 – Each team launches their payload, tracks, follows and recovers it.
  • Day 3 – Teams gather together for plenary morning.

Our aim is to support and inspire teachers and other adults working with young people. The hope is that those that attend will return to lead a project with their groups that will do something amazing.

Attendees will be supported throughout the course by experienced HAB enthusiasts and the Raspberry Pi Education Team. If you are a UK teacher or work with young people (scout leader, youth leader etc), you can apply here.



Through working with the UK Space Agency on the Astro Pi project we’ve learnt about something called Outernet. Internet, Outernet – see what they did there? Outernet is a small company started by Syed Karim that broadcasts the most useful stuff from the internet via satellites in geostationary orbit.

Anyone receiving the broadcast then has access to all that stuff for free! The idea is that you can receive it in locations around the world where there is little or no internet infrastructure; or perhaps where the regime in power curtails access to information.

The UK Space Agency is working with Clyde Space, a Scottish technology company, to manufacture and launch a constellation of cube satellites to extend Outernet’s global coverage.


The content is the kind of thing you would find in a public library, with resources on human health, anatomy, encyclopaedias, how-to guides and news feeds. The data is broadcast cyclically so that any new receiver joining the broadcast can catch up with everyone else. The content received from the satellites is cached and served out to the users via http pages, meaning that any device with a browser can be used to read it (both Ethernet and WiFi are supported). It’s worth noting this is only one-way content, because you can’t send messages back up to the satellites.

Outernet also has a board of trustees whose job is to curate which content from the internet makes it into the broadcast. They’re also planning a voting system, which will allow anybody with internet access to participate in that process.

What’s all this got to do with Raspberry Pi? Outernet offers several different kinds of receiver; and the DIY one is based on a Raspberry Pi! After learning this, we decided to get one up and running at Pi Towers to evaluate the tech! So I contacted Syed Karim, and he generously sent us three DIY receiver kits to play with.


The main piece of hardware you need is a USB DVB-S2 dongle. The one included in the kit was designed specifically by Outernet to keep costs down. The dongle allows you to plug in the coaxial cable from a satellite dish and consume the data on the Pi.

In Europe, the Outernet broadcast is delivered through the Hotbird satellite, which has a footprint covering all of Europe, North Africa and parts of the Middle East. Because of its orbital position you need a slightly larger than normal dish to receive it. 60cm or larger is required, so we just ordered an 80cm one from Amazon.

Here it is installed on the roof of Pi Towers:


Aligning a satellite dish correctly can be a bit of a dark art, so we hired a professional with his own equipment to come and make sure it was pointing in the right direction.

It’s then simply a matter of burning a special SD card image provided by Outernet to an SD card, and booting the Pi up. This is essentially a minimal Linux ARM distro that has everything required to make the reciever work; it’s not Raspbian based and currently only works for the Pi 1 CPU.

Here’s our one:


The DVB-S2 dongle on the top plugs in via USB and has its own mains power supply. Currently, we think, we’re the first receiver online in the UK (up since the 2nd of June).

The software you use to access the downloaded content is called Librarian, and looks like this:


At the moment, it’s mostly news articles that are being broadcast. Each row in the list above is a different article, and each has one or two medium-resolution images along with the text.

There is also a nice configuration page allowing you to choose which satellite you’re using, and to monitor how large the database has grown.


New content coming down from the satellites is held prior to being added to your library, allowing you to choose which items to keep or discard.


Currently about 200MB of data per day is delivered through the broadcast; however, in the future they hope to offer up to 1GB per day.

We see this technology as being a fantastic solution to the problems with offline web servers that go out of date over time. When something is updated on the internet, the Outernet service can just retransmit the new version and all the receivers will update their local copies. We’re also aware that various NGO charities are already using Raspberry Pi networks in remote places with equipment like RACHEL-Pi (which we’ve covered here before). This system could easily be dropped into a network like that as an additional resource, providing a great source of searchable information.

We’re going to be watching Outernet with interest in the future,12-1 and we are considering the possibility of having some of our educational resources broadcast by their service.

If you want to buy a DIY reciever they’re available in the Outernet online store now.


Flappy Brain

Alex Eames from Raspi.TV has done my job for me today: here’s a video interview with Albert “Winkleink” Hickey from this month’s Cambridge Raspberry Jam, and a demo of his simply outrageous Flappy Brain game, which is controlled using nothing but your brain. (And an EEG monitor, an Arduino and a Pi.)

Albert says he plans to write up kit and code soon; we’ll be keeping an eye on his website for that, and will add a link here when it’s done. Thanks both! (I’m now going to experiment with refraining from blinking when I concentrate.)


Diddyborg metal edition

We had some special visitors at Pi Towers a few weeks ago: the PiBorg folks, makers of some pretty terrifying Pi-based robots. Here’s Eben, charging off into the sunset on their largest robot.

We made sure he got off before it did this.

We love PiBorg’s robots. They’re totally uncompromising, the build quality is something else (these little guys are as solid as a dalek’s six-pack), and they’re ultra-controllable, with six independent motors.


DiddyBorg Metal Edition is made in a limited run of forty, with bigger motors, bigger batteries and more power than the regular Diddyborg. (And more metal. Did we mention the metal?) It can climb 45º slopes, tow smaller objects, and you can steer it like a tank. I love this thing. Its superpowers include:

  • Autonomous ball following
  • Autonomous Recon run
  • 6 axis Playstation 3 remote control (bluetooth module required)
  • Controlling via other computers on a network

Here’s Eben again, this time using a DiddyBorg Metal Edition in a domestic setting.

If DiddyBorg Metal Edition is outside your price bracket, PiBorg also have a range of other robots, and everything you need to build your own, all the way from motor controllers to soldering irons. Check out their store; it’s the sort of place that’ll give you ideas.

PiBorg shot a very metal DiddyBorg Metal Edition video to accompany the release of their limited run. Enjoy!


Raspberry Pi Official Case


Want to buy one without reading about the adventure we had in getting this to you? Scroll to the bottom of this post.

Two and a half years ago, I found myself sitting in a car with Eben Upton about three days into my new job at Raspberry Pi. We discussed – among other things – everything we wanted to do with the Raspberry Pi hardware and with the products around the Pi.

One of the things we discussed was an official Raspberry Pi case. We thought that it would be great to create something affordable, but with the kind of real beauty and design that our products try to encompass.

So to this end we began the search for a design company who were capable of understanding our requirements and had their eyes firmly fixated on creating a product that achieved those aims.

Kinneir Dufort (click that link; there’s a lovely demonstration of how the case comes together) came to our attention and turned up with an amazing first set of ideas. Of all of these Eben and I were completely bowled over by the one on the inside front cover of the report (which contained in total 6 main designs and 20 secondary designs).  But to make sure we weren’t being driven in the wrong direction we decided to continue with three main designs, which came out of prototyping looking like this:





Kinneir Dufort went away and created 3D designs and models to understand how they might work (or not work) and returned with the following:


During the meeting we wanted to reduce it down to a final choice but found it really difficult to get there.  Eben decided to make some small changes to the lovingly 3D printed version:


We liked the idea of them adding an area for the logo but there wasn’t enough room, so Eben made room!

Next, Kinneir Dufort refined this to create a more complete model of the three designs with input from Eben and me. We finally decided that the Construct design was the ‘right one’ and they proceeded to finalise the design to be suitable for injection moulding.


We spent months refining the design until we got to a point where we thought that Construct – the case we’re selling today – was as good as a case possibly could be.

Meanwhile we went looking for a partner to work with for the manufacture of the cases and the design of the injection moulding tool. (And this, for those of you – I know there are some – who’ve been watching this project avidly since we first mentioned it and have been struck by how long it’s taken us, is where the delays came in.)

Initially we worked with a company based in the north of England to create an injection moulding tool. During this process we learnt a lot about injection moulding!

Injection moulding is quite simple in theory. You build a metal tool to shape the plastic. You take some pellets of your base material and mix in some master batch (that’s the colour pellets which you mix in around 1 – 2 percent). You then put these into an Archimedes screw that turns and pushes the pellets through a temperature-controlled system, which simultaneously melts and mixes the plastic.


The picture above is of the injection ram. Once the plastic is melted and pushed into the ram the ram then presses (with around a double decker bus’s force) the plastic into the mould.


Now, due to the massive pressures involved here, you simultaneously need to press with another double decker bus from the opposite direction to stop the plastic just spraying out of the mould. The next step is known as packing (this is ‘just keep pushing’ because as the plastic cools it contracts, making slight imperfections in the finish).  From the picture above, you can see pipes at the top of the metal tool. These are where a coolant (usually just water) is piped through the mould to help cool the plastic, otherwise it gets deformed when you open the tool up.

After about 20-30 seconds of cooling (during which time the Archimedes screw is heating up the next shot of plastic) the mould is opened up and the plastic is ‘ejected’ from the mould  by all those pins!


You can see the ejection pins pushing the plastic out of the mould. If you get this wrong, the ejection pins will just make holes in the plastic!

In practice there are some things that maybe you might not have thought about. The time it takes to cool down is related to the volume of plastic injected and the thickest parts of the mould. This limits the speed at which you can make the cases, although you can flush through more cold water to help cool it, but this has a knock-on effect because you now need to push the plastic into the mould quicker, or you end up with lumpy bits of partly hardened plastic!

Also, you have to be careful pushing plastic from a thinner area to a thicker area because it doesn’t spread very well (meaning you have to push it for longer). Plus all of this stuff has to be done using very, very hard steel (remember those double decker busses…) which you can’t work on in normal ways like using drills, a file and a bit of elbow grease. Instead you have to use magic electrolysis (like they taught you at school), The picture below shows the copper anodes used to create the tool for various parts.


We spent a lot of time asking the toolmakers to make changes and the moulding company to press out some new cases – and then being annoyed that they weren’t perfect. We went through literally dozens of imperfect iterations – lumps here and there, clips that didn’t clip, inconsistent colours, ill-fitting parts, bits dropping off the case, incongruously fragile and snappy corners – and eventually we gave up and moved our business to a company a little more used to the type of high quality injection moulding that we required.

T-Zero, the company we should have gone with in the first place, is based in Dudley and employs a small team of dedicated people who know all this stuff upside down and back to front. They’re brilliant. Plus, they know a toolmaker, who doesn’t just know what he’s doing, but is also capable of turning the air blue whilst he’s doing it. :)

We met Brendan, Simon and Mandy because we really needed a second opinion about the tool we had already paid a significant amount of money for and that didn’t seem to be any closer to being finished after a year of small improvements. They looked at the tool and agreed that it could be salvaged and that they would be able to create the case of our dreams!

They then spent a couple of months working with us and their toolmaker to produce some truly awesome finished cases. The pictures you see above were taken during this process. The final case now clips together cleanly and stays clipped together, all the interfaces are ‘just right’ the colouring is perfect and it can be made in the quantities we were hoping for. We’re really proud of it.

So in conclusion, it’s not just plastic.  It’s about design, love, attention to detail, accuracy, iteration and overall damn hard work! We think you’ll love this new case as much as we do. It’s functional, it’s very good looking, and you can pick one up from our own Swag Store, element14, or RS Electronics. (If you’re outside the UK, their local representatives – MCM Electronics, Newark and Allied in the USA and some other locations – also have them available; and we expect to see the cases appearing in other partners’ stores soon.)

If you’d like to know a little more about the whole process then please ask away in the comments.