Astro Pi Coding Challenges: a message from Tim Peake

Back in February, we announced an extension to the Astro Pi mission in the form of two coding challenges. The first required you to write Python Sense HAT code to turn Ed and Izzy (the Astro Pi computers) into an MP3 player, so that Tim Peake could plug in his headphones and listen to his music. The second required you to code Sonic Pi music for Tim to listen to via the MP3 player.

Astro_Pi_Logo_WEB-300px

We announced the winners in early April. Since then, we’ve been checking your code on flight-equivalent Astro Pi units and going through the official software delivery and deployment process with the European Space Agency (ESA).

Crew time is heavily regulated on the ISS. However, because no science or experimentation output is required for this, they allowed us to upload it as a crew care package for Tim! We’re very grateful to the UK Space Agency and ESA for letting us extend the Astro Pi project in this way to engage more kids.

The code was uploaded and Tim deployed it onto Ed on May 15. He then recorded this and sent it to us:

Tim Peake with the Astro Pi MP3 player

British ESA astronaut Tim Peake’s message to the students who took part in the 2016 Astro Pi coding challenges to hack his Astro Pi mini-computer, on the International Space Station, into an MP3 player. The music heard is called Run to the Stars composed by one of the teams who took part.

In total, there were four winning MP3 players and four winning Sonic Pi tunes; the audio from the Sonic Pi entries was converted into MP3 format, so that it could be played by the MP3 players. The music heard is called Run to the Stars, composed with Sonic Pi by Iris and Joseph Mitchell, who won the 11 years and under age group.

Tim tested all four MP3 players, listened to all four Sonic Pi tunes, and then went on to load more tunes from his own Spacerocks collection onto the Astro Pi!

Tim said in an email:

As a side note, I’ve also loaded it with some of my Spacerocks music – it works just great. I was dubious about the tilt mechanism working well in microgravity, using the accelerometers to change tracks, but it works brilliantly. I tried inputting motion in other axes to test the stability and it was rock solid – it only worked with the correct motion. Well done to that group!!

“That group” was Lowena Hull from Portsmouth High School, whose MP3 player could change tracks by quickly twisting the Astro Pi to the left or right. Good coding, Lowena!

Thanks again to everyone who took part, to our special judges OMD and Ilan Eshkeri, and especially to Tim Peake, who did this during his time off on a Sunday afternoon last weekend.