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:

https://vimeo.com/167392781

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.

11 comments

Avatar

The music is really good and the mp3 player script looks interesting.Definitely worth checking out.

Avatar

Still feels so surreal to think the nice smiling gentleman is in that tim-can {sorry tin-can} >400km above our heads. I saw it hurtling at >7600m/sec above my head the night before last again. At least Tim P has now got some good tunes to listen to up there! Good job folks.

PS is it Ed or Izzy we can see in the video ? ;o)

Avatar

It’s Ed!

Avatar

Thanks Liz. You know how it is differentiating twins sometimes….even if they aren’t identical, garçon/fille ;o)

Avatar

While you are listening, Liz, how can you update fully this time around? I have been waiting for a blog entry about it for a long time and I just have to know now.

Avatar

Well done Lo, we are all very proud of you!!

Avatar

He is playing our song!
WOW!
From,
Iris and Joe Mitchell

Avatar

I am so happy I got to be part of this competition and I’m amazed that I am one of the winners! My entry was inspired by space and sci fi and I am currently working on another song on SonicPi.

-Isaac Ingram

Avatar

Well done Isaac! We really enjoyed listening to the tunes, and we’ve been playing the winning entries quite a lot in the office (as I’m sure Tim is also doing in space) – thank you!

Avatar

ooh

Avatar

Very good job. I really like this music!

Leave a Comment

Comments are closed