Sonic Pi re-visited

Just three more day before the deadline for the “write a tune for Tim Peake with Sonic Pi” challenge. Using “sonic Pi” does not depend on setting up a Raspberry Pi because the software may be downloaded onto any laptop allowing users to progress at their own pace. Headphone are essential – if only to protect everyone near by. As a non-musician it seems a great way to allow anyone who does not play an instrument to “make music” but I have wondered how musicians feel about it. Is a Sonic Pi tune really music? I suppose an analogy might be made by asking whether a computer generated picture is truly “art”.
Going back to Tim Peake.
>This competition offers a unique chance for young people to learn core computing skills that will be extremely useful in their future. It’s going to be a lot of fun!” said Tim Peake.

The winners will have their code uploaded to the ISS and used by Tim on the Astro Pi computers (on a best-effort basis subject to operational constraints).

David Honess, from the Raspberry Pi Foundation, spoke with Tim just before launch and learned that it is difficult to update the astronaut’s MP3 player while in space. “So there’s a practical, utilitarian purpose for having the students code this MP3 player for him. It’ll solve a real problem on the space station,” said David.

The first challenge is for students to write Python code to turn the Astro Pi into an MP3 music player, something that it was never designed for. The students will need to program the buttons, joystick and LED display to provide an iPod-like interface, so that Tim can plug in headphones and listen to music.

The second challenge requires students to compose their own music using a tool called Sonic Pi. This allows music to be created using lines of code, and is a really fun and engaging way to learn to program. Tim will then use the MP3 player code from the first challenge to listen to the second challenge’s music in space.>

I wonder how they will choose the winners? Elegance of code or the quality of tune? Or both

Sonic Pi and the latest Astro Pi challenge

CMD<create>CTRL has been up and running for one whole month. Where next? Sonic Pi? More Scratch? More work with breadboards and GPIO pins? The robot is now held together by double-sided Velcro and elastic bands – time, perhaps to review the chassis and think about modifications/ improvements. I learnt something last week. I had purchased a power-pack for the Raspberry Pi so that the robot could be freed from the power cable but when the youngsters attached it there was no power. As I was wondering whether I had kept the receipt and whether I had time to return the ‘faulty’ item, one of the lads enquired, “You did charge it didn’t you?” Oops! To be fair, there was no documentation inside the box that the power pack arrived in so I had assumed that it was ‘ready to go” just like an ordinary battery. Two of the girls will not forget the traffic light sequence which they needed to program the red, yellow (=amber) and green LEDs that they had connected to their Raspberry Pis via a breadboard.

Girl holding a Raspberry Pi and Sense hat
Marian explaining her entry for last year’s Astro Pi competition

More about ‘Sonic Pi’. Most of the youngsters know that British astronaut , Tim Peake, is aboard the Russian space-ship currently circling earth. Many also know that school pupils were challenged last year to design and code experiments for Tim to carry out using a Raspberry Pi plus a Sense Hat while in Space. In fact, Marian won “highly commended” for her entry. Now there is a new challenge involving Sonic Pi: “After the success of the first competition, Tim is now looking for more students to write code for him to run in space. The Astro Pi Coding Challenges, launched on February 3rd, pose a specific problem to the students and asks them to solve it with code.”. . .”There are currently two challenges on offer, which are both music-based. The first asks students to write Python code to turn the Astro Pi into an MP3 music player, something that it was never designed for. The students will need to program the buttons, joystick and LED display to provide an iPod-like interface, so that Tim can plug in headphones and listen to music. The second challenge requires students to compose their own music using a tool called Sonic Pi. This allows music to be created using lines of code, and is a really fun and engaging way to learn to program. Tim will then use the MP3 player code from the first challenge to listen to the second challenge’s music on board the ISS. The competition is open to all primary and secondary school-age students who are resident in the United Kingdom, and it’s supported by a comprehensive range of teaching resources that are available for free on the Astro Pi website. The deadline for submissions is March 31st.”

Plenty to do on Monday  . . .

 

 

AstroPi Competition: Guest Post

AStro Pi
Astro Pi

My name is Marian Jago, and I really enjoy coding, and it is a shame that there aren’t many children who enjoy it, or at least know about it. I recently entered a competition called Astro-pi, which uses the raspberry pi. It also uses python, which is a programming language. The idea of the competition is to think of an idea to display certain variables, which are monitored through sensors on the Astro-pi, such as temperature, humidity etc. Or you can do something else if you think it is a god idea, the Premise is that it has to be interesting or useful, which I believe my both of my ideas were.

The first idea I had was to display all variables on a graphic equalizer, with different colours depending on how far the levels were. If the levels reached an orange level the buzzer which was included would sound off, alerting Tim Peake, whom was going to be using the code, to any danger. That idea was what I did with my school, with the help of Yasmeen Bey, whom wrote the code with me.

However I had an idea for an experiment, which I turned into a code, which was highly commended. The idea for the experiment was, “ After spending a certain amount of time in space, would one still be able to orientate oneself as well as on earth?” After all, without gravity, many factors change, we depend on gravity for balance, so what if that was taken away, would we be able to balance in a zero-gravity environment? So what I did was write a code that first displays a green screen, then when one presses a button it displays a red screen and the person must close their eyes and try to spin 360 degrees, then press the button and open their eyes, the code will save their “score” and this only takes a few seconds to do, so Tim Peake could perform perhaps, once a week.

The results could tell us some important information about balance and gravity.