Tag Archives: Uncategorized

Astro Pi: New chance to send your code into space!

via Raspberry Pi

Right now, British ESA astronaut Tim Peake is using one of our intrepid Astro Pi flight units, Ed, to run UK school students’ code on board the International Space Station. Ed’s sister unit, Izzy, will be turned on next week to carry out more students’ experiments. These two specially equipped Raspberry Pi computers are running apps and investigations made by young people in our Astro Pi competition last year, and if you’re aged 18 or under and in the UK, we’re thrilled to be able to offer you another chance to send your code into space!

If you’re already working on our new coding challenges, be sure to read on for news of a new requirement that we have introduced to one of them, to take account of operational constraints we have to abide by in order to run code on the ISS.

New Coding Challenges – Astro Pi

It also gives us great pleasure to announce two new coding challenges, where the prize is to have your code uploaded and run by Ed or Izzy in space! That’s right – your code in space! The first requires you to write Python Sense HAT code to turn Ed and Izzy into an MP3 player, so …

Tim Peake explained to us that he enjoys listening to music while exercising, which is a daily activity for him during his mission. But he won’t be able to upload new music to his iPod because the software used for this isn’t allowed on the ISS laptops. To solve this problem, Tim invites UK students to try two coding challenges: one is to write a program to turn an Astro Pi flight unit into an MP3 media player that he can operate using its buttons, and the other is to write a tune in Sonic Pi for him to listen to on the MP3 player.

You can try both challenges, or just one. Up to four winners for each challenge will have their code uploaded to the International Space Station and run on Tim Peake’s Astro Pi units.


The Sonic Pi music challenge is an exciting, creative challenge that you can carry out whether or not you have any experience of coding, and without any special hardware. Go to the Sonic Pi music challenge page to see exactly what you need to do, and to find resources that will introduce you to everything you need to know to start work on an amazing electronic tune for Tim.

Sonic cover

The MP3 Music Player challenge is an interesting task for people who already have some experience of Python programming. For this challenge, you’ll need to use hardware the same as Tim’s to develop and test your program, so you’ll need access to a Raspberry Pi and a Sense HAT, which are available to buy online. The MP3 Music Player challenge page explains the requirements for your MP3 player, and links to resources that will help you meet them.

We’ve added a new requirement for the MP3 Music Player challenge since announcing it earlier this month, because the European Space Agency has explained that, due to operational constraints, we can’t upload new Raspbian or Pip packages to the ISS to support the new coding challenges. You can read more about the restriction and what it means on Astro Pi’s GitHub. Happily, it’s not hard to work around this restriction, and to help you get going, we’ve created two examples of MP3 playback that are known to work on the Astro Pis in space, and that you can adapt and integrate into your own code.

Tim on ISS w Astro Pi mission patch

It’s not often that you get the chance to send something you’ve created into orbit – don’t miss out! Check out the new challenges, pick one and start working on your code to send into space. You’ve got until 31 March to submit your entries. We, Ed, Izzy and Tim can’t wait to see them.

The post Astro Pi: New chance to send your code into space! appeared first on Raspberry Pi.

Fran Scott’s explosions-based computing

via Raspberry Pi

We were wowed by this at Bett 2015, so we were delighted when we saw that Bett had published a video of it. Top science explainer Fran Scott uses Raspberry Pis with fruity inputs and explosive outputs to introduce key computer science concepts to kids, teens, and people who love pyrotechnics (which is all of us, and especially Clive). Her show is called #Error404: The Explosions-based Computing Show.

BETT Arena 2015: #Error404: Fran Scott

Error404: The Explosions-based Computing Show Fuelled by the recent change in the curriculum, Fran has turned her skills to producing a stage show all about Computer Science. “#Error 404” is a high-octane coding stage show ideal for KS2-3.

Fancy doing something similar yourself? Fran’s a trained pyrotechnician and a member of the Association of Stage Pyrotechnicians, and even Clive admits that we should leave the explosions to her, but you can safely use your Raspberry Pi to make a balloon go bang with our Balloon Pi-tay Popper resource.

The post Fran Scott’s explosions-based computing appeared first on Raspberry Pi.

Meeting educators and learners at Bett 2016

via Raspberry Pi

For anyone in the education technology community, January is synonymous with Bett. This trade show has been taking place in London for over thirty years, and now sees over thirty thousand educators, students, parents and technology enthusiasts descending on the ExCeL Centre in Docklands to find out about the latest learning technlogies.

CZUqdcjWYAAqVH7.jpg large

Raspberry Pi and Code Club have been represented at the show before, but for the first time we had our own area together in the new ‘STEAM village’ section of the show. Although the name may suggest a return to Victorian age technology, this area was about promoting the crossover subjects of Science, Technology, Engineering, the Arts and Mathematics. We took over a whole side of this village, with a dedicated workshop area and table stations showcasing many of our programmes.

Our area was packed, with back-to-back workshops every thirty minutes that often had standing room only. We ran sessions on everything from how to start a Code Club in your school, to how to get started programming a Sense HAT and using the GPIO. Hundreds of people took part in a half-hour workshop, and a few keen ones stayed most of the day! Almost half of those at the Code Club workshops planned to start their own club after taking part.


It was amazing to have members of the Raspberry Pi community join us to lead workshops, including Raspberry Pi Certified Educators, Raspberry Pi Creative Technologist Andrew Mulholland, and European Digital Girl of the Year Yasmin Bey.

Thanks to Alan O’Donohoe, Stephen Manson, Cat Lamin, Mike Trebilcock, Graham Bowman, Andre Mullholland, Neil and Toby Bizzell, and Sam Aaron for running workshops for us.

Raspberry Pi Foundation and Code Club staff were also presenting all over the show on computing and digital making. Carrie Anne Philbin presented on how teachers are changing the gender narrative in computer science and on digital making across the UK.

Creativity in the digital classroom

A highlight of the show for me was seeing Sam Aaron showing the power of Sonic Pi in the main arena. Working entirely from a Raspberry Pi with an IQ Audio Pi-DAC+ HAT, Sam rocked the several hundred people in the arena with both his music and his message: that programming is a new form of creative expression.


Sam Aaron in the Arena

Throughout the show we talked to thousands of enthusiastic educators and learners. Staff on the Code Club stand alone had in-depth conversations with over 1500 people on starting clubs in their communities. I really enjoyed hearing from so many people who came to the stand to chat about the projects they had made themselves or with their students. I snapped a few of them with my own PiZero powered RetroPiCam project, and got talking to many more about their plans to start Code Clubs in their schools.

Philip & Carrie Anne on RetroPiCam

CZgTF-EW0AABnzd.jpg large

We also talked to a lot of people looking to get started with Raspberry Pis. Luckily for them we had thousands of copies of both Carrie Anne Philbin’s book Adventures in Raspberry Pi and a special educators’ edition of The MagPi, both full of ideas for learning and teaching with a Pi. As with all editions of The MagPi, you can get your hands on a free PDF here if you missed out at the show.

Saturday saw the first ever Raspberry Jam at Bett, organised by Ben Nuttall. The Pi community took over one of the learning theatres, bringing line-following robots, pirate ships, and a whole host of other creative Pi projects. Many members of the Pi community from across the country came to meet up, and passers-by at the show joined in too.

CZZvmoEXEAA30nl.jpg large

I’ve been visiting Bett for years. I’m used to the busy aisles and the enthusiasm of educators about the world of technology, but I was still blown away by the numbers of people who came to see us and the strength of their enthusiasm for Raspberry Pi and Code Club.

What’s great about this show is that most of the people you speak to work directly with children or young people. The enthusiasm we saw will translate into many opportunities for them to learn about computing and digital making.

The post Meeting educators and learners at Bett 2016 appeared first on Raspberry Pi.

Another new Raspbian release

via Raspberry Pi

Some of you may have spotted that there is a new Raspbian release available for download. For most people, this is primarily updates and bug fixes to the existing Jessie image – but there’s one exciting new feature that might be of interest to some people…

But before we get to that, here’s a summary of the other changes.

New versions of applications

There are new versions of many of the standard applications.

Sonic Pi is now at version 2.9. A full list of changes can be found in the History section of the Info window in Sonic Pi, but the highlights include two new effects functions, a new logging system, and the inclusion of all of Sam Aaron’s articles for The Magpi magazine as part of the online tutorials.

Scratch is now at version 20160115. This has improved sound input capabilities, support for the CamJam EduKit 3 robotics board, basic PWM support in the GPIO server, and various improvements to the display, including font scaling.

Mathematica is now at version 10.3. This adds support for a larger set of the functionality detailed in Stephen Wolfram’s new “Elementary Introduction to the Wolfram Language” book. It also supports the use of the Sense HAT, adds interfacing to Arduino, and includes many new Mathematica functions.

Node-RED is now at version 12.5 – this adds no significant new functionality, but fixes a number of bugs and contains some internal performance improvements.

New versions of libraries

WiringPi has been updated to version 2.31, which allows GPIO pins to be accessed from applications that use the library without needing to use sudo. For more details, see the WiringPi website.

The RPi.GPIO Python library has been updated to version 0.6.1 which includes some bug fixes which affected the new GPIO Zero library.

The Java platform included has been updated to version 8, update 65.

Bug fixes

The volume/audio device icon on the taskbar is now compatible with a wider range of USB audio devices – people reported that it was impossible to set some USB sound devices as the default output. Due to the way the ALSA system works, it is very difficult to make this completely infallible, but the new version should work with a much wider selection of devices than before.

The Main Menu editor now allows new menus to be created. In earlier versions, due to an issue with the way the LXDE desktop environment interpreted its configuration files, creating a new menu caused all other menus to be hidden – this should now work correctly.

The GUI Raspberry Pi Configuration and command-line raspi-config applications now offer the correct overclocking options on all Pi 1, Pi 2 and Pi Zero boards. There are also some updated language translations submitted by the community – many thanks to the translators!

The Wastebasket is now consistently named as such everywhere when the desktop is set to British English. (It previously had a wide selection of names in different places, including Trash and Rubbish Bin…)

The ping command no longer requires sudo.

One more thing…

We hope the above changes are useful, but Raspbian will still look pretty much the same as it did for the last release in November. But we have been working on one other thing behind the scenes for this release: this won’t be of interest to most users, but for some, we hope it will be very useful.

In this release we are shipping an experimental OpenGL driver for the desktop which uses the GPU to provide hardware acceleration. This is turned off by default – if you want to enable it, you can find it in the command-line version of raspi-config, under Advanced Options->GL Driver. Due to memory requirements, this will not work on Pi 1 or Pi Zero boards – it is solely for Pi 2. (raspi-config will only allow it to be enabled on a Pi 2; be warned that if you enable it on a Pi 2 and then move that SD card into a Pi 1 or Pi Zero, the Pi will not boot.)

If you don’t use this option, the desktop does have OpenGL support, but it uses a very slow software renderer, which makes all but the most basic OpenGL applications pretty much unusable. The hardware-accelerated version is much faster, and makes some quite decent OpenGL games playable on the Pi.

As a quick demonstration of the effect of the driver, try installing the mesa-utils package with

sudo apt-get install mesa-utils

This installs a simple OpenGL demo program called glxgears which shows three rotating gear-wheels. To run it, type


With the standard software renderer, this runs at around 23 frames per second, flickers a lot, and doesn’t actually show the correct colours. If you try it again with the new driver enabled, it runs at the screen refresh rate of 60 fps, with no flicker and the correct colours.

Rotating gears are all very well, but they aren’t that exciting, are they? So how about some actual games? One that is popular in the office is Neverball – try

sudo apt-get install neverball

This barely runs at all under the software renderer, but is quite slick and playable with the new driver.


Or try Oolite, which looks quite similar to another game that those of us of a certain age remember fondly.

sudo apt-get install oolite


There are various other OpenGL games and applications available in apt – to find them, try

apt-cache search opengl

Bear in mind that this is an experimental release of the driver which we are making available to the community as a public beta test; it is still slightly unstable, there will inevitably be some graphic glitches, and you shouldn’t expect every OpenGL program to run perfectly. It also has some side effects, notably in terms of making small changes to the way normal windows and menus are displayed. For this reason, we’d advise only enabling the driver if you know that it is going to be useful for some specific program you are using; if you’re not sure whether or not you should be using it, you probably shouldn’t be!

How do I get it?

A full image and a NOOBS installer are available from the Downloads page on this website.

If you are running the current Jessie image, it can be updated to the new version by running

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install raspi-gpio

To add the experimental GL driver, you will also need to run

sudo apt-get install xcompmgr libgl1-mesa-dri

As ever, your feedback on the new release is very welcome – feel free to comment here or in the forums.

The post Another new Raspbian release appeared first on Raspberry Pi.

Astro Pi: 3D-Print Your Own Flight Case

via Raspberry Pi



Back in December, British ESA astronaut Tim Peake took two specially augmented Raspberry Pis, called Astro Pis, to the International Space Station (ISS) as part of his six-month mission. These Astro Pis are running experimental Python programs written by school-age students; the results will be downloaded back to Earth and made available online for all to see.

To satisfy the safety requirements that ESA and NASA have for small payloads aboard the ISS, we had to build the Astro Pi flight unit and put it through a rigorous qualification process.

Laser-etched Astro Pi

One of the two Astro Pi flight units

Ever since this case was announced back in May 2015, people have been asking, “Where can I get that case?”

At £3000 each, you can see why we only ever made eight of them. Why do they cost so much? Each half of the case is milled out of a solid block of aerospace-grade aluminium using a five-axis CNC mill. The two halves are then bead-blasted to give them a matt surface, then they’re anodised with a special coating to aid thermal radiation. After that, there’s some manual touch-up work, followed by installing the Raspberry Pi hardware and, finally, laser-etching the markings and logos.

That all adds up!

However, to quote from the original blog post where we announced it:

This will not be available to the public to buy because we’re only making a small number of them. We may however, in due course, release an object file so schools with a 3D printer can print one themselves.

With today’s blog post we’re making good on this promise!

The first attempt

Initially we just tried to 3D-print the original CAD files to see how hard it would be. The trouble with 3D printers is that they use hot thermoplastics, which can bend and sag under their own weight.

To avoid this, the printer creates what’s known as scaffolding and rafting to ensure the structural integrity of the object during the printing process. The user has to peel off this support material to get the original object they were trying to print. Any part of the object that overhangs will cause support structure to be built below it to prevent sagging. So the lower part of the flight case, with the grid of pins, came out chock full of the stuff:


Scaffolding and rafting that must be manually removed

After about 20 minutes with a pair of pliers, and accidentally snapping one of the corner pins, we decided this would be too frustrating for most users.


The base with scaffolding and rafting still remaining

The lid was slightly better. It was printed with the outer surface of the case facing downwards, to avoid support structure filling the internal cavity. But this meant that the outer surface came out with rafting all over it, and removing this resulted in a characteristic stringy finish that doesn’t look great.


The lid, printed with outer surface facing down

So we set about modifying the design so that even users with low-end 3D printers would be able to successfully print it, with minimal scaffolding and rafting.

Several attempts later

Many thanks to Ben Martin from Solid Models in Cambridge for running off so many test prints for us, and to Jonathan Wells (who did the original CAD work) for the many tweaks and changes. Our own Creative Producer, Rachel Rayns, contributed lots of 3D printing experience which led to these decisions. It was most definitely an iterative process!

The first change we agreed on was to slice off the heat sink on the base, so that it could be printed in the opposite orientation. That way it would have nothing overhanging to cause support structure to be built between the pins.


The heat sink as a discrete part (click for 3D STL view)

We then sliced off the top of the lid so that it could be printed with the clean side facing upwards, meaning the stringy side would face down.


The lid as a discrete part (click for 3D STL view)

That was a lot nicer looking. So with the lid and heat sink sliced off, it meant the two original middle bits were left as discrete parts.


The middle as a discrete part (click for 3D STL view)

We also removed the pillars between the USB and Ethernet ports because these snapped off easily. Finally, for convenience, we changed the corner bolt enclosures from a sunken captive screw to a straight-through M4 nut-and-bolt design.


The base as a discrete part (click for 3D STL view)

You can use epoxy adhesive (or similar) to join the heat sink to the base and the lid to the middle. When the Raspberry Pi and Sense HAT are installed it’ll end up looking something like this:


The assembled flight unit, still missing a few buttons

New resource

To guide you through the assembly process we’ve created a brand new educational resource that covers everything from downloading the STL files and getting the fixtures and fittings you need right through to testing that you’ve wired up the push buttons correctly. Click through and take a look:

3D Printed Astro Pi Flight Case | Raspberry Pi Learning Resources

The Astro Pi flight case is one of the most desirable cases in the history of the Raspberry Pi. With this resource you will learn how to 3D print your own case and install the Astro Pi hardware inside it.

We’re really looking forward to seeing the cases you make – please show us by tweeting pictures to @Astro_Pi and @Raspberry_Pi.

By far the most exciting benefit of owning an Astro Pi flight unit is the ability to prototype and test code that could be run on the International Space Station. Head over to the Astro Pi website now to get involved in the new coding challenges!


Where are the STL files?

On GitHub.

Why are there four files, not two?

We sliced the case into four layers to minimise the amount of scaffolding and rafting that needs to be printed; it also keeps printing time down. The text of the blog post above explains this in more detail.

Can we modify the STL files?

Yes. They are released under the Creative Commons attribution license so you are welcome to modify them. Please note that GitHub has a great STL viewer and also has a 3D file diff, which could be useful for tracking changes.

Can we have the original CAD?

Currently, no. Raspberry Pi needs to retain the ability to be the sole manufacturer of the space-qualified Astro Pi flight unit. You are welcome to reverse-engineer the STL files we’ve released today, though.

How do you fit the hardware inside it?

The educational resource we’ve written covers this in great detail: check it out here.

I don’t have access to a 3D printer, but I really want this case. What can I do?

You may be able to find one at your local hackspace. You can also find local 3D-printing services through the 3D Hubs website.

The post Astro Pi: 3D-Print Your Own Flight Case appeared first on Raspberry Pi.

Dr Who theme on a Pi Zero

via Raspberry Pi

I am an unabashed synthesiser nerd. I grew up in the 1980s on a rich diet of Gary Numan, the Pet Shop Boys and Erasure, and had my own Roland Juno 60 (approximately fourth hand and very battered) in my bedroom. And that, ladies and gentlemen, is how I learned about sine waves.

Phil Atkin, who you’ve read about before in these parts, has spent the last few years building some incredibly sophisticated synthesiser software for his Raspberry Pis. Recently, he has been working on a Pi Zero. I hate to get all Buzzfeed on you, but you won’t believe that a $5 computer can do this one weird thing. Click play, and pass out in AMAZEMENT.

Phil says:

Over 52 years ago, I heard the Doctor Who theme for the first time at my grandmother’s house in Sheffield, at the Stones brewery in Burton Road, Sheffield, the first ever episode. I was only 4 years old, the sounds terrified me, the whole family sat transfixed at the noises, which had been created some months previously by the awesome Delia Derbyshire at the BBC Radiophonic Workshop. No synthesizers, just wobulating oscillators, tapes and a shedload of patience, diligence and dazzling creativity.

That was 1963.

Now it’s 2016 (bloody hell, last time I looked it was 1978) – can you believe you can do all that AND MORE for £4.99 today? One Raspberry Pi Zero (£4), one 99p USB audio interface, and the difficult bit – a huge bunch of very specialized, hardcore, time-consuming software development.

This track has 8 Virtual Analog monosynths, one wavetable synth (polysynth but with polyphony set to 1 as I am somewhat lax with the noteOff messages throughout!) and a single sample replay synth for the Tardis takeoff effect.

The VAsynths are :
Channel 1 : kick/tom – noise, bandpass filtered slightly resonant, and an EG to shape the amplitude
Channel 2 : snare (same setting as 1 but up the scale)
Channel 3 : the old faithful ‘Martyn Ware Glitterclap’ – these 3 are not exactly canonical but I wanted to add in a blast of “Human League do Gary Glitter / Doctorin the Tardis” for the outro. This is a burst of noise modulated by a square wave LFO, shaped by an EG to become a decaying train of noise pulses, bandpass filtered and quite resonant to emphasise the clappiness
Channels 4/5 : a pair of Radiophonic Wobulators, sin waves which warm up (some Phase Distortion, some morphing to slightly square) under a slow ramping EG, which also ramps up the LFO amplitude that is FM and AMing them. These have a bend range of +- 24 semitones for the giant 2 octave swoops
Channel 6 : the diddly dum bass riff. This is really velocity sensitive, both in amplitude and in brightness. OSCB gets louder under velocity, and both OSCs sharpen up under hard bashing – the ‘fine pitch’ modulation output is hooked into a fast EG. So really hard hits sound like plucked strings, sharpening immediately under tension then going true very quickly
Channel 7 : a bass ‘slurp’ for the grace notes – a slightly less bright version of the riff, and with a larger reverb send amount to distance it
Channel 8 : a noise generator with a keyfollowed bandpass filter, with some resonance to be played manually (hence hamfisted noises throughout). Heavily feedback delay adds SFX swishy whooshy things to the mix – really spacey, dude!
Channel 9 : a wavetable synth for the ‘melodica’ melodic notes
Channel 10 : EXTERMINATE! Samples, for the heck of it

Plus there are 4 delays with low pass filters and independent LR settings for delay, levels and feedback levels, plus a stereoizing reverb engine.

Can you believe it – 10 whole synths, all of them awesome, 8 of them virtual analog, on £4.99 of computer hardware. Less than 5 quid!!! 2016 is an insane place to be.

Thanks for the awesome arrangement Delia. And thanks to the Timelords for “Doctorin’ The Tardis”, spotting the unholy glory that is the mashup of Delia Derbyshire and early 70s glitterpop. So glorious a mashup that Hell’s Bells, I just HAD to slap the tempo up from 140 to 143 BPM as the drums kick in. I go WHOO HOO every time that happens, and I don’t often get actually excited by something I’ve created.

p.s. major thanks to the team at dwtheme.com without whom my tone deaf / ‘cannot do intervals’ brain would have struggled to make sense of this – this would have taken a month rather than 2 days!!

Phil is looking for commercial support for the work he’s doing – you can drop him a line here if you think you can help.

The post Dr Who theme on a Pi Zero appeared first on Raspberry Pi.