Raspberry Pi

Sonic Pi: Live & Coding Summer School

Carrie Anne – I have an ongoing long-term love affair with Sonic Pi ever since Dr Sam Aaron from the University of Cambridge introduced me to it in late 2012 to help me teach text-based programming to my students. Since then it has been used to teach music and artistic expression thanks to the Sonic Pi Live & Coding project, which I’ll talk more about in the coming months as it reaches its conclusion. A few weeks ago 60 children took part in a Sonic Pi Live & Coding summer school run by artists Juneau Projects at the Cambridge Junction. Here, in their own words, is their take on the experience:

Sonic Pi Live & Coding summer school

The Sonic Pi Live & Coding summer school finished just over three weeks ago, and yet our heads are still full of it! It was a brilliant week where 56 children aged between 10 and 14 years spent the week at the Cambridge Junction, working amazingly hard not only to get to grips with the language of live coding, but also learning how to finesse that language and perform with it using Sonic Pi on Raspberry Pi. It was a beautiful thing to be a part of. Over the course of five days the students went from having never used Sonic Pi before to putting on a concert for an invited audience, incorporating never-before-seen software functions (literally added on the spot by Sam Aaron – the brains behind Sonic Pi – to help realise the students’ ambitions) and incredible showmanship!

Juneau Projects artists Ben & Phil

The plan for the week was not only to introduce the students to the technical aspects of Sonic Pi (i.e. how do you make a sound, and then make it sound how you want it to sound etc) but to offer an overview of what live coding sounds like and looks like and what it might become in the students’ hands. To this end we were lucky enough to see performances by Thor Magnusson, Shelly Knotts and Sam Aaron himself (wearing an incredible cyberpunk/wizard get-up – it’s amazing what a party hat and a pair of novelty sunglasses can do). The students were able to quiz the performers, who were all very open about their practice, and to get a sense not only of how these performers do what they do on-stage but also of why they do what they do.

Sam gives a performance to the students

The summer school was delivered by a great team that we were proud to be part of: Ben Smith, Ross Wilson (both professional musicians) and Jane Stott (head of music at Freman College) had all been part of the initial schools project during the summer term (at Freman College and Coleridge Community College) and brought their experience from those projects to help the students at the summer school on their journey into live coding. Michelle Brace, Laura Norman and Mike Smith did an amazing job of keeping everything moving smoothly over the course of the week, and in addition Michelle did a brilliant job of keeping everybody on track with the Bronze Arts Award that the students were working towards as part of the week, as well as project managing the whole thing! Pam Burnard and Franzi Florack were working on the research component of the project, interviewing students, observing the process of the week and feeding back to us – their feedback was invaluable in terms of keeping the week moving forward in a meaningful way. We had visits from Carrie Anne Philbin and Eben Upton from Raspberry Pi who supported the project throughout. Finally Sam Aaron was resident Sonic Pi guru, handling all those questions that no-one else could answer and being a general all-round ball of live coding enthusiasm.

Buttons + Sonic Pi + Raspberry Pi = Fun

The week held many highlights: the first ever Sonic Pi live coding battle (featuring 56 combatants!); live ambient soundtracks produced by thirty students playing together, conducted by Ross Wilson; Sonic Pi X Factor; and great guest performances by Thor and Shelly. From our perspective though there was no topping the final event. The students worked in self-selected groups to produce a final project. For many this was a live coding performance but the projects also included bespoke controllers designed to aid the learning process of getting to grips with Sonic Pi; ambient soundtrack installations; and a robotic performer (called ‘Pitron’).

The performances themselves were really varied in terms of the sounds and techniques used, but were universally entertaining and demonstrated the amount of information and knowledge the students had absorbed during the week. One group used live instruments fed directly into Sonic Pi, using a new function that Sam coded during the summer school – a Sonic Pi exclusive! A personal highlight were the Sonic Pi-oneers, a seven piece live coding group who blew the crowd away with the breadth of their live coding skills. They’re already being tipped as the One Direction of the live coding world. Another great moment was Pitron’s appearance on stage: Pitron’s creator, Ben, delivered an incredible routine, using lots of live coding skills in combination with genius comedy timing.

Live coding of music with Sonic Pi, instruments and installations.

All in all the summer school was a phenomenal thing to be a part of. We have never quite experienced anything like it before – it truly felt like the start of something new!

China press and community tour

As you might have spotted, if you follow us on Twitter, Eben and I spent the last week and a bit touring China, meeting the Raspberry Pi community there and giving interviews to the press, with some sterling organisational help from our friends at RS Components. (A special and huge thank you to Eric Lee, without whom we’d have been absolutely stuffed. Mostly with delicious pork confections and noodles, but stuffed nonetheless.)

Here’s what we got up to.

First up, there were a lot of press conferences to give, with help from the excellent William, our simultaneous translator; after a week of doing this, we ended up with more than 100 pieces of media being written or recorded about Raspberry Pi across China. This one, in Shanghai, is pretty typical.

We noticed that the tech press in China is incredibly well-educated; a lot of these journalists trained as engineers and then moved into publishing. (And everywhere we went, at least 50% of the technical journalists were women – something I wish we’d emulate in the west.)

We went to a Raspberry Jam in Shanghai, held at RS Components’ offices. We met some great people (Kevin Deng and the gang from 52pi.cn, a Chinese website dedicated to the Raspberry Pi, actually followed us on to the next event in Shenzhen as well), who’d built some amazing projects.

The robot on our desk is LIDAR (laser radar)-equipped, from DFrobot. We’re listening to a talk about open source from David Li, one of China’s most famous open source pioneers. Eric Lee from RS is on the right.

This laser-etcher is one of the projects the 52pi gang had brought along; you can buy lasers for this sort of project off the shelf in China, where the integrity of your eyeball is your own responsibility. I’ve got a couple of coasters with our logo on them on my desk at the moment, made using this machine.

Jackie Li gave an amazing talk about the projects he’s made at home – cameras streaming to remote screens, a simplified media centre for his grandma, robots – and this excellent LED persistence of vision device for displaying reminders in the kitchen.

We flew out next to Shenzen, where hundreds of people turned up for a Raspberry Jam, and where we did more press conferences and more interviews. Before we left for China, I’d been worried that the community base would be smaller than we’re used to. It turned out to be almost too large for us to deal with in the time we’d had allotted in each location.

It got a bit hard to move in Shenzhen for all the people wanting a photo. We saw some great presentations (one of which, from Martin Liu, who describes himself as a living-room maker, demonstrated the work we sponsored to get the XBMCmenu working in new fonts – including Chinese. It’s at the back of the photo here, behind all the people with cameras.)

We met a lot of Shenzhen makers who are also entrepreneurs; on the left here is Zoe from Seeed Studio. Eben’s holding some sensors from their Grove project, which works with Raspberry Pi.

This young gentleman had a robot to show us, controlled with Scratch (on the desk to the right), and a poster for Eben about Pi-controlled brewing. He was terribly shy, and I really wanted to give him a hug, but suspected that might have made matters worse.

We managed to get about an hour at the enormous electronics market in Shenzhen with Eric, where we had some fun looking at components and working out if we could lower the bill of materials cost in the Pi itself. Unfortunately, it’s so big you need at least a week to work your way around the place; we plan to return.

Next stop, Taipei. We started off at Noise Kitchen, where we met a group from CaveDu, a local hacker group. The robot in the middle was being prepared for the next day’s Jam at Tatung university – the display shows how many likes CaveDu’s Facebook page has.

These guys hung around for HOURS to meet us, for which we’re very grateful; our plane was delayed six hours, and we didn’t get there until nearly 11pm. I met a home-made laptop with a removable wireless keyboard (a clever way to get around the hinge problem), and made a new best friend.

First thing the next morning, we headed out to Tatung university.

We were expecting a few tens of people, having failed to learn our lesson from Shenzhen. More than 250 people turned up.

Among the crowd was my new best friend from the night before. We do not have a language in common, but we bonded over high-fives and fist-bumps.

It was HOT; about 33C in the shade. And unfortunately, the air conditioning in the building got turned off an hour or so in, so we get damper and damper as these photos progress and the temperature climbs well above 40C.

We met a self-balancing robot in a hamster ball.

We bumped into an old friend. (The beer is there for thermal reasons.)

Eben got interviewed, sweaty, by Taiwanese TV.

And this is my other new best friend, Liang Chih Chiang, who gave a presentation (which he’s very kindly translated for me so you can all read it) about our community and social media – a subject that’s very close to my heart, for obvious reasons.

We saw some amazing projects, like this gaming machine…

…this Pi-powered 3d printer…

…and this, which I was never able to get close enough to to find out what it does. I think it might be a musical instrument. Or possibly a cocktail machine.

Any suggestions, anybody?

We had a wonderful, exhausting, wonderful time. Thanks so much to everybody who came to see us; and an especial thanks to Eric, Desiree, Soo Chun, Katherine and the rest of the RS gang, who looked after us so well. We hope we’ll be back in a year or so – and until then, here’s a picture of a bit of press that I can’t read, but that’s made me laugh more than anything else that’s been published about us this year.

 

 

 

 

 

 

 

Layer Cam: the lensless tourist camera in a lunchbox

Have you ever noticed the way that everybody takes the same photo when doing the tourist thing? Just look at Google: there are a million pictures of people punting past King’s College Chapel in Cambridge out there, all taken at the same angle, from the same position – and they’re all online. So why do we (and I’m just as guilty of this as everybody else) spend precious time taking pictures of something that somebody’s almost certainly taken a better photo of already?

SaladeTomateOignon in Paris, another photogenic city, has noticed the same thing.

He says:

28 million people visit Paris every year, taking dozens of pictures each. Every building, every statue has been captured, under every sky and every light.

Because billions of pictures of the Eiffel tower have been taken, I am sure that you can find matching cloud patterns in dozen of them, even if taken years apart.

Pictures have been taken with simple pin-hole camera, smartphones or with the most complex and expensive large format silver film camera or DSLR, and lots of them are now online.

On the Internet, those photographies are sprinkled over the city, with some areas densely covered, and other more sparsely. Each website is like a stratum of pictures of every kind: postcards, paintings, photos, satellite images…

Layer cam is a project to tap into those layers, like a drill extracting a core sample of images.

Based on a Raspberry Pi, connected to the Internet through wifi and geolocalized by a GPS chip, Layer cam runs with Python code (mostly made from bits of code I found here (Martin O’Hanlon) and there (disasterjs) and taps into Panoramio API. The ‘Layer cam’ logo has been designed by Alice.

We love this project. It’s just the right amount of pointless, it’s in a Tupperware box, Paris is beautiful, and it made us smile. You can find out how to build your own at saladtomateoignon, with code and physical build instructions (which involve rubber bands and duct tape, like the very best of projects).

What does a good computing classroom look like?

Space matters

In September 2014 (as in a couple of weeks) the new Computing curriculum will come into play in schools in England. Basically this means that ICT as a subject will be replaced by Computing and that students from the age of five will have the opportunity to learn an exciting and powerful new subject.

There has been a lot of discussion on how to prepare for this in terms of teacher training. It’s vitally important and it’s why we run Picademy for example. But as the subject matures we also need to start thinking about what an effective computing classroom looks like and how to set it up so that students can get the most from the subject.

Teaching and learning spaces

My primary school was not like others. Pupils were free to roam about and do what they wanted. It was an interesting educational experiment. I now know what happens when pupils are responsible for their own education: they smear their faces with woad (well, Crayola indigo warmed up on the radiator) and then scuttle up trees. (Student voice, I’m looking at you.)

Next lesson I will independently investigate the physics of boomerang precession

There were no classrooms in this school of the future, just “bays”—quasi-rooms with no walls, opening onto a central area. It was a terrible environment for most subjects: it’s tricky to concentrate on improper fractions or ‘How come the moon doesn’t fly off into space?’ when the bay across the way is thrashing a class set of percussion instruments like a colony of chimps pummelling the corpse of dead hyena.

So I’ve never been a fan of “learning spaces”. Even typing the phrase makes me start rocking gently and keening. And yet learning spaces are exactly what the new English Computing programme of study needs. Walk into a standard ICT suite in any secondary school in the land and you will be stared down by banks of unblinking monitors lining the walls and the central reservations.

This is not a learning room, it’s a teaching room. It’s set out so that teachers can monitor the monitors (and monitor the monitor monitors if they are lucky enough to have them) and control what the students are doing with their hermetically sealed PCs. What they are typically doing, given the closed nature of hardware and software in most of these suites, is usually pretty anodyne. It should come as no surprise that the word “suite” comes from the old French meaning “a group of identically clad followers”.

Even Orwell wouldn’t have gone this far

This new-fangled ICT thing: it’s a slippery slope and no mistake

So what the typical student is doing in the typical ICT suite is … ICT. Which is great! Good teachers are running rich and exciting and useful ICT lessons under the old programme of study (PoS). Outstanding teachers have been including elements of computing into their lessons for years (contrary to the belief of those who had never actually read it, the old PoS was pretty flexible and adaptable). But all too often a school’s ICT policy is that the subject should be safe. Not inspiring or useful or thought provoking. Just safe.

Which would be lovely if this meant ‘safe’ for the kids, but more often than not it means ‘safe’ for the senior management. ICT isn’t to be trusted: kids obviously needed watching because they might do bad things. Like play games. Or watch games on YouTube. Or write games and pretend to be testing them. Students have even been known to flip screens upside down using hot-keys; or draw rude pictures in Paint and set them as the desktop of their neighbour’s machine; or stick a Post-it on the bottom of the teacher’s mouse; or Google “funny gifs of cats with glok’s and a bom lol!”

Hence this urge, especially amongst techno-wary management, to constantly monitor and repress and interfere. Technology that enlightens and frees and encourages experimentation is the same technology that is potentially seditious and disruptive and encourages hacking (hurrah!). So it’s sad but unsurprising that in the current climate schools lock down PCs and stop students from messing about. A more open environment doesn’t require lots of time and money (two big barriers to change in schools) but it does need thoughtful policies and a desire to change.

Would you like a handful of magic beans with that interactive whiteboard sir?

All together now: “Marie France est dans le jardin.” Beeeeeep.

Of course, if all you want to do is to create things on a screen, then a bank of proprietary PCs does the job (though installing some open source software like Inkscape, Audacity, LibreOffice, Firefox and GIMP wouldn’t hurt). But things have changed since the late 90s when IT quietly became ICT and a new curriculum came in: prescribed hardware and proscribed software just aren’t good enough now that Computing is back (in retrospect, they weren’t even fit for purpose then). A generic classroom stifles creativity and if Computing is one thing, it’s creative.

Looking back at my ten years in an ICT classroom it’s clear to me that most ICT suites are the 21st century equivalent of the shiny new language labs that popcorned into secondary schools in the late 70s: shiny and exciting but ultimately a bit rubbish. My old stock cupboard is full of unused smoke-and-mirrors ICT kit that was sold as the next big thing but turned out to be technology for technology’s sake. (We’re very fond of the old magic beans thing in education, but that’s another blog post entirely.) Technology by itself rarely improves learning. Good teachers in stimulating environments always do.

A new classroom for the new programme of study

For the new Computing programme of study let’s give the students the freedom to tinker and to hack and to experiment and to collaborate. And let’s give them the space and the tools to do this. PCs still have a place of course, but ideally there will be a central table(s) full of electronics, robots, sensors, computers, projects kits, stuff you’ve found in skips, printers, bits and bobs, cutters and a runcible spoon. (And, of course, Raspberry Pis!) Let anyone who wants to play come in at break, lunchtime and after school to mess around. Encourage other subjects to use computing as a creative tool, one they can use in their lessons, and to look at Computing and not say “Whatever” but “Hmmm, that’s interesting…” (Because if Computing is not used across the whole curriculum then we are missing both the point and a huge learning opportunity.)

For this we are going to have to change our ICT rooms from teaching rooms to learning spaces. It’s not a trivial thing and it won’t happen overnight. But if you are offered a new room in which to teach Computing this September, or you get the chance to re-purpose an existing ICT suite, please make it the first thing on your agenda. In fact, make a space like this:

Laika school workshop day

In time, ten years perhaps, computing in schools will be a normal tool for problem solving and creativity. Just a tool to do things in the same way that, on a much smaller scale, a calculator is used today in Maths (although the things you can do are very much cooler and more useful than telling your mate to type in ’5318008′ and hand it, upside down, to your teacher). In the meantime, let’s get the learning spaces right. The rest will drop into place.

How you can help

We’re currently writing materials on how to set up a computing classroom and we’d like your help. What would your ideal computing space look like and why? What would you like to see in there, how would it be set up and how could the Raspberry Pi Foundation help you with this? We’d love to hear your thoughts on this and the final materials will be published in our resources area. Comments below would be lovely, thanks!

Getting hooked on programming with YRS project ‘Hook’

Carrie Anne: A few weeks ago, Raspberry Pi hosted its first ever Young Rewired State centre and took part in the Festival of Code. We had a lot of fun. Our participants talked about their experience in this blog post. Whilst we were at the finals in Plymouth, our teams were competing against a group from BBC Birmingham mentored by our good friend Martin O’Hanlon, and their Raspberry Pi project blew us away. Here in their own words is a little more about it.

Not only functional, but stylish too!

While taking part in the YRS Festival of Code at BBC Birmingham our team wanted to come up with something fun. The idea we finally settled on after much talk of boats and canals (thanks Martin!) was the internet enabled coat hook – a coat hook which would tell you what to wear that day based on the weather forecast.

Fuelled by an endless supply of biscuits and coffee at BBC Birmingham and with the help of our mentors we set about creating our ‘hack’. At the weekend down in Plymouth we were lucky enough to make it into the final three for the ‘Best in Show’ category, losing out to another team. However since we were runners up in the category we were rewarded with some limited edition Blue Raspberry Pis!

Our idea was well received throughout the weekend in Plymouth, but what surprised us most was the reception that it received online. Seeing people we’ve never met before announce online that they’d buy our ‘internet enabled coat hook’ that we’d hastily constructed a few days prior was the craziest part of the weekend.

We’ve each written a short paragraph about our contribution to the ‘hack’ and what we learnt during the week.

 Jenny & Ed: Why did we use Lego to build the Hook? Because it’s a classic building material enabling the design of Hook to be easily changed during development, as well as being sturdy AND fun – no actually it was because Kevin (from YRS) promised cake to any teams that used Lego in their hack.

We built the Lego around the coat rack and then the LED chipboards to secure the whole thing together, originally using a breadboard to connect up the Raspberry Pi and the LEDs with crocodile clips, however we kept facing issues where the LEDs would not light up. We realised that this was because one of the clips wasn’t on properly or the pin in the breadboard was loose, so decided that it would be more secure and look better if we created an actual chipboard and soldered all the parts together: cue multiple expeditions down to the workshop and a lot of time bonding with the soldering iron (if you’ll pardon the pun). The building of the Lego structure took around half a day, not including the numerous heated discussions about which colour bricks to use, and then completing the circuitry meant we had a working prototype design only a couple of hours later.

Darci: I worked on the animation for our project (The Hook). To do this, the BBC gave us some prototype LED boards, which I programmed using a Scratch-like program. We were going to make weather-specific animations for wind, rain and sunshine, but as we only had four days to produce it, I ended up making one animation to show all of the weather animations together.

I started off figuring out how to control the LEDs using an Arduino, but then we all agreed that it would be better to use a Raspberry Pi rather than an Arduino because I find Python much easier to understand than Arduino, and we could also use the GPIO to hook up the LED devices to the Raspberry Pi. So, it seemed simpler to use the Raspberry Pi to control everything instead. I used Python and the RPi.GPIO library to write the code to allow the back end to control the LEDs.

Darci presents Hook

Cameron: I ended up working on the back end which was written in Python. It controls the obtaining and processing of the data from the Met Office and then runs lower level code written by Darci. The Met Office API was really nice and returns a Weather Type field in the JSON response which saved us having to come up with our own heuristic for what the weather will be like. The best take-away from this for me would have to be the program PuTTY which is a free SSH client for Windows that removed the need to connect anything except a Wi-Fi dongle to the Raspberry Pi. The JSON library for Python was very useful and easy to work with as well, something that’s well worth learning.

Jack: I worked on the front end of the website which allows the user to configure what item of clothing they wanted to place on each individual hook, which could potentially change depending on the time of year. In order to fetch relevant weather forecast data from the Python backend the user’s geolocation was fetched through the browser using JavaScript. Additional information such as the item of clothing on each hook was written to a text file, allowing it to be easily read by the Python script. We aimed to make the website responsive across multiple different screen sizes, so writing CSS media queries was a new skill I had to learn during the week. Luckily the good folks mentoring at BBC Birmingham were happy to show me the ropes.

YRS BBC Birmingham Team Hook

Carrie Anne: Although this project did not win in its category, it could still win the public vote! If you are as impressed as we are with this project then head on over to the voting page to cast your vote for Hook!

The first Raspberry Pi computer room in Togo

Dominique Laloux first got in touch with us in May 2013 when he was on the point of leaving to spend a year in the rural Kuma region of Togo in Western Africa, an area where, until 2012, 75% of teachers had never used a computer. He had previously joined a team of Togolese friends to set up the Kuma Computer Center in the mountain village of Kuma Tokpli for the students and teachers of five local secondary schools, and planned to introduce Raspberry Pis there.

The building that currently houses Kuma Computer Center’s first computer room in Kuma Tokpli

We next heard from Dominique earlier this month. We were delighted to learn that besides the Center’s first computer room, which has now been up and running for almost two years, the team has established a fully functional Raspberry Pi computer room, with 21 Pis and a couple of other PCs, in Kuma Adamé, a village about 20 minutes’ motorbike ride from Kuma Tokpli. This will be used daily by the 200 students of the local middle school, and was financed largely by former Adamé residents who have settled in Lomé, Togo’s capital. A team of students and teachers from The International School of Brussels, where Dominique works, helped fund the purchase of the Raspberry Pis and their accessories.

The new Raspberry Pi computer room in Kuma Adamé

The initial focus is on teaching the students basic computer literacy, and the team chose the Raspberry Pi based on its low initial cost, its anticipated low maintenance costs, its low power consumption and its use of Open Source software. Dominique believes – and we think he’s probably right – that this is the first Raspberry Pi computer room in Togo! He says,

The most important thing is that we now have a nearly complete “recipe” for the setup of a computer room anywhere in Togo, that would fit a middle school/high school for a total cost of about 6000€. The recipe includes the renovation of a school disaffected room (see what our room looked like 6 months ago in the picture), the installation of electricity and local area network at European standards, the design of furniture built by local workers, the training of teachers, the development of a curriculum to teach, the selection of a local support team, etc. Quite an experience, I must say.

Before work began on the new computer room

Key to the sustainability of the project is that it has been developed within the local community for the benefit of community members, having begun as an idea of teachers in Kuma. Various groups in the community are represented in the management of the project, contributing different kinds of support and expertise. Dominique again:

We are particularly proud of the setup in K. Adamé (we being Seth, Désiré, all other members of the Kuma Computer Center team, and myself). [...] Our project has been operational for nearly 2 years now and it relies mainly on villagers themselves. Seth, who is in charge of the infrastsructure in K. Tokpli, is a local farmer growing mainly coffee and cocoa. A team of villagers is responsible for opening the room every day for 2 hours at least, and “cleaning teams” make sure the rooms stay in perfect condition. Local teachers will now take over the regular “computer classes” I taught during the entire past school year — sometimes going up to 40 hours per week. The newly installed Raspberry Pi reinforces our infrastructure and will serve 200+ students in K. Adamé from the next school year…

Currently the team is constructing a small building in Kuma Tokpli, which will become the permanent base of the Kuma Computer Center (and the second largest building in the small village), superseding the facility currently made available by a local farmers’ association. They also continue to work on the curriculum, and hope to introduce the students to programming in addition to teaching ICT and using the Raspberry Pis and other computers to support learning across the curriculum.

If you’d like to support the Kuma Computer Center, with funds or otherwise, have a look at their website. And if you’ve got an idea as good as this one to teach young people about computing, you’ll want know about the Raspberry Pi Education Fund, recently opened for applications and aimed at supporting initiatives like this with match funding; learn more here!

Call for questions: Q & A interview with the engineering and education teams

Back in February 2014, Matt Timmons-Brown captured Gordon, our Head of Software, and would not let him go to the café for his “Gordon Special” until he had spilled all of our secrets.

Gordon thinking about ‘Specials” as the ghost of a Toltec shaman hoots mournfully over his shoulder.

Matt is spending some time at Raspberry Pi Towers shortly and we’d like to do this again, but this time with added educationy goodness from one of the education team.

So: what would you like to know about Raspberry Pi? Post your questions below. The more questions we get the more interesting the Q&A sessions will be, so fire away!

Pi Wars

Helen: This December will see a Cambridge Raspberry Jam with a difference; we’re giving you all plenty of notice, so that you have time to prepare. We’ll let organisers Michael Horne and Tim Richardson tell you all about it.

On 6th December this year, the Cambridge Raspberry Jam (CamJam) will play host to the first ever dedicated Raspberry Pi robotics competition: Pi Wars. Named after the BBC series Robot Wars, this competition is challenge-based and is similar to a ‘robot olympics’. Robots will take part in challenges to score points and, as we all know, points mean prizes! Our aim isn’t to have robots destroy each other – we want people to compete to show what they’ve managed to get their robots to do!

We’ve put together some overall rules for the competition which you can read here.

The robot challenges are as follows:

  • Line Follower
  • Obstacle Course
  • Proximity Alert
  • Robot Golf
  • Straight Line Speed Test
  • Sumo Battle
  • Three Point Turn
  • Aesthetics
  • Code Quality

You can read a full description of each challenge by visiting this page.

We’ve also got some side-competitions into which competing robots are automatically entered:

  • Smallest robot
  • Best non-competing robot
  • Best autonomous robot
  • Most feature-rich robot
  • The Jim Darby Prize for Excessive Blinkiness
  • Most innovative robot
  • Most visually appealing robot

We’re also hoping to have some non-competing robots in our Show-and-Tell area.

We are expecting (okay, hoping!) to have 16 robot competitors. This will give us a nice sized competition without having so many that we’re there until midnight :-&#41 We’re even hoping that it will be an international competition – we’ve already had interest from a team in Egypt! Obviously, we’ll also have tickets available for spectators, of which we’re expecting between 100 and 150.

We are looking for sponsors to supply prizes for the competition and you can get more information on that by visiting this page.

Registration for the competition opens on 15th September and registration for spectator tickets will open sometime in late October/early November. We’re hoping that it will be an extremely popular event… Who knows? This could be the start of an annual event!

If you’d like to read more about Pi Wars, visit www.piwars.org.

Upcoming Picademy Dates – Get Teachers Applying Now!

It’s the summer holidays, and I know teachers will be enjoying a well earned break from thoughts of planning lessons and marking homework. But here at Pi Towers, the Education Team are already busy thinking about the new academic year and the start of term. In particular, we are busy planning the next series of Picademies, and we want to make sure that your favourite teacher doesn’t miss out!

Dates for new academic year diaries are:

  • 29th & 30th September 2014
  • 27th & 28th October 2014

Note: We have changed the date for September’s Picademy from 1st & 2nd September to 29th & 30th, because many schools have Inset days at the start of the month.

So are you a teacher? Do you know a great teacher? Today is ‘Poke a teacher to apply for Picademy day’ (totally official). We need your help to track down wonderful educators to tell them about our free training course known as Picademy and ask them to apply to join the fast-growing ranks of Raspberry Pi Certified Educators (they get a badge and everything!)

Babbage with his Raspberry Pi Certified Educator Badge

Raspberry Pi Academies for Teachers (Picademies) take place in Cambridge, UK. We invite practising teachers with any subject specialism (we’ve had art, design tech, science and even history teachers attend), who teach any age group between 5 and 18 years old, to come to Pi Towers for two days of fantastic fun learning for free. There are no strings. The Raspberry Pi Foundation is an educational charity – offering free CPD to teachers is part of our charitable mission.

Want to know what actually happens at a Picademy? Then read Clive’s report about Picademy 3 or check out the Picademy section on the official Raspberry Pi forums.

What will you learn? Don’t miss out, apply today!

September’s Picademy will look favourably on applications from teachers in the South West of England, because I love clotted cream, but also because we’re very aware of regional accessibility to training and support, and so occasionally we will focus on specific regions. So if you are a teacher in the South West, we would love to have you here. This does not mean applications are open to teachers in the South West only! Please apply, teachers, wherever you are. And because we’ve had so many requests from teachers overseas, we are also now accepting applications from practising classroom teachers outside the UK too!

Applications for September Picademy will close on Friday 5th September. If you have been successful, we will let you know via the email address that you supplied in your application, no later than two weeks prior to the event. Applications for October will close on Friday 10th October.

What are you waiting for? Go grab a teacher and APPLY HERE NOW! (Do it!)

Smartphone rocket launcher

Teenage electronics enthusiast Lewis Callaway thought that an ad in which actors launch rockets from their iPhones was really cool, but he couldn’t find out how it was done, so he decided to start from scratch himself, using (of course) a Raspberry Pi.

Model rockets are launched by passing an electric current through an igniter, a device that includes a thin piece of wire in contact with the rocket’s propellant; the current causes the wire to heat up, igniting the propellant. Lewis used a relay board and jumper leads to complete the circuit between a 9V battery and the model rocket’s igniter, and connected power and signal wires between the relay board and his Raspberry Pi’s GPIO pins so he could flip the switch on the 9V circuit with a signal from the GPIO.

To allow him to send the launch command from a smartphone, he installed the WebIOPi framework on the Pi. A custom web page hosted on the Pi contains a nice, big, orange LAUNCH button; pressing it runs a Python script which, in turn, controls the GPIO. A portable router provided the wifi hotspot necessary to view the web page on the phone.

Lewis also talks about his fantastic project in this Adafruit Show and Tell (starting at 7m55s), and shows how the system can be tested without actually launching anything—important if, like Lewis, you are working indoors.

We know that every day, Raspberry Pis lie idle when they could be launching rockets, and this makes us feel sad. Read the article Lewis wrote for Make: including links to his code and the parts that he used, and try it for yourself!

Slice – a media player using the Raspberry Pi Compute Module

We revealed the Raspberry Pi Compute Module back in April, and released the Compute Module Development Kit in the middle of June. Since then we’ve had a lot of interest and will shortly start shipping the Compute Module in volume to a variety of manufacturers who have already designed it into their products.

One of our goals with the Compute Module was to enable a generation of “Kickstarter consumer electronics” startups to develop commercial-quality products at relatively low volume. We’ve already we’ve seen the OTTO point-and-shoot camera, which was the first ever Kickstarter using the Compute module, and today marks the launch of another campaign which we hope will be even more successful.

Slice media player and remote

Slice is an XBMC media player built around the Compute Module, with simple custom skin, a shiny milled-aluminium case, and a cute ring of 25 RGB LEDs for (and I quote) “visual feedback and wow factor”. It’s been developed by Mo Volans, our old friends Paul Beech and Jon Williamson from Pimoroni, and our very own Gordon Hollingworth and James Adams; they’ve been burning the candle at both ends to get Slice to where it is now, and the prototypes are looking pretty drool-worthy.

Check out the video below, and then head on over to Kickstarter to see for yourself why we’re excited about Slice!

Young Rewired State – Festival of Code 2014

So, you may have seen on our twitter or elsewhere that we were a host centre for Young Rewired State’s Festival of Code 2014. We had 6 young people join us at Pi Towers for a week: Ben, Rihanna, Amy, John, Finn and Dan.

The aim of Festival of Code is to inspire and support young coders in creating something new – the only specification is that it must include an open data set.

From Monday to Thursday the teams worked on their own projects, Ace Your Place and Moodzi, with mentors and members of the Raspberry Pi team. We even had Twilio and Code on the Road pop by.

On Friday we all traveled down to Plymouth for the weekend to meet up with all the other centres.

I will hand over to Ben and Finn (part of team Ace Your Place) to tell you more…

Ben:

From the moment I stepped through the doors of Pi Towers I loved it. It was an incredibly creative and friendly atmosphere and all our mentors for the festival were really inspirational.

On the first day we came up with project ideas and split into groups; then worked on developing the project and preparing a presentation before we left on Friday.

I worked in a group of 4 on a project called Ace Your Place, a service that helps people pick the right region to move to when they’re relocating.

The mentors were only there to help us when we needed it, and were brilliant at guiding us through the creative process. I learnt so much in general just from being around similarly minded young people, and of course from the mentors as well.

On Friday we travelled to Plymouth, along with everyone else taking part in the competition. The sheer number of focused young people was amazing, and the atmosphere was so exciting. Everyone couldn’t wait to share their projects and see everyone else’s, and though it was a competition, everyone was extremely supportive.

Through the various rounds of the competition we got to see a lot of the other projects, and I was amazed with the dedication of some of the other teams. It was a truly inspirational experience seeing the range and scope of all the ideas, with some of my favourites being “hook”, a coat hook that interpreted the weather and told you what to wear (powered by a Raspberry Pi) and “QuickAid”, a crowdsourced first aid service which informs and calls first aiders in the area when someone is in need of it.

On the whole, the Festival of Code was an enlightening, motivating and stimulating experience. The first part of my week at Pi Towers couldn’t have been a better learning environment, and the weekend was immensely good fun and extremely inspirational. I’ve made new friends and acquired new knowledge, and I can’t wait for next year!

Finn:

I personally really liked CityRadar, Miles Per Pound and QuickAid – which I thought was a really good idea and very well thought out.

When we had some free time it was mostly dominated by the photo booth…

I found the music at the end interesting because I hadn’t really heard that kind of music before – I quite liked it!

I definitely want to go to the Festival of Code again next year and would be delighted if I could do it with the Raspberry Pi Foundation.

Thanks Ben and Finn!

Amy and Rihanna’s project Moodzi used the twitter API to tell you when was the best time to tweet particular keywords.

Whilst waiting for the coach home I even caught our YRSers hacking their RFID wristbands to send people off to random websites.

Also, in Plymouth Carrie caught up with her biggest littlest fan.

I can’t wait until next year either.

More QPU magic from Pete Warden

Back in June, we mentioned Pete Warden’s port of the Deep Belief image-recognition SDK to the Pi, which used the VideoCore IV QPUs to provide an accelerated GEMM matrix-multiply function. Since then, Pete’s been optimizing his code, and has reduced the time required to process an image to 3 seconds (versus 20 seconds for the baseline ARM implementation and 6 seconds for his original QPU version).

Classifying dogs and their balls

In the spirit of “leaving a trail of breadcrumbs through the forest”, Pete has written up an excellent summary of his experiences here. Head on over and check it out.

An image-processing robot for RoboCup Junior

Helen: Today we’re delighted to have a guest post from 17-year-old student Arne Baeyens, aka Robotanicus, who has form in designing prize-winning robots. His latest, designed for the line-following challenge of a local competition, is rather impressive. Over to Arne…

Two months ago, the 24th of May, I participated in the RoboCup Junior competition Flanders, category ‘Advanced Rescue’. With a Raspberry Pi, of course – I used a model B running Raspbian. Instead of using reflectance sensors to determine the position of the line, I used the Pi Camera to capture a video stream and applied computer vision algorithms to follow the line. My robot wasn’t the fastest but I obtained the third place.

A short video of the robot in action:

In this category of the RCJ competition the robot has to follow a black line and to avoid obstacles. The T-junctions are marked by green fields to indicate the shortest trajectory. The final goal is to push a can out of the green field.

This is not my first robot for the RCJ competition. In 2013 I won the competition with a robot with the Dwengo board as control unit. It used reflectance and home-made colour sensors. The Dwengo board uses the popular pic18f4550 microcontroller and has amongst other functionalities a motor driver, a 2×16 char screen and a big, 40pin extension connector. The Dwengo board is, like the RPi, designed for educational purposes, with projects in Argentina and India.

As the Dwengo board is a good companion for the Raspberry Pi, I decided to combine both boards in my new robot. While the Pi does high-level image processing, the microcontroller controls the robot.

The Raspberry Pi was programmed in C++ using the OpenCV libraries, the wiringPi library (from Gordon Henderson) and the RaspiCam openCV interface library (from Pierre Raufast and improved by Emil Valkov). I overclocked the Pi to 1GHz to get a frame rate of 12 to 14 fps.

Using a camera has some big advantages: first of all, you don’t have that bunch of sensors mounted close to the ground that are interfering with obstacles and deranged by irregularities. The second benefit is that you can see what is in front of the robot without having to build a swinging sensor arm. So, you have information about the actual position of the robot above the line but also on the position of the line in front, allowing calculation of curvature of the line. In short, following the line is much more controllable. By using edge detection rather than greyscale thresholding, the program is virtually immune for shadows and grey zones in the image.

If the line would have had less hairpin bends and I would have had a bit more time, I would have implemented a speed regulating algorithm on the base of the curvature of the line. This is surely something that would improve the performance of the robot.

I also used the camera to detect and track the green direction fields at a T-junction where the robot has to take the right direction. I used a simple colour blob tracking algorithm for this.

A short video of what the robot thinks:

Please note that in reality the robot goes a little bit slower following the line.

Different steps of the image processing

Image acquired by the camera (with some lines and points already added):

The RPi converts the colour image to a greyscale image. Then the pixel values on a horizontal line in the image are extracted and put into an array. This array is visualized by putting the values in a graph (also with openCV):

From the first array, a second is calculated by taking the difference from two successive values. In other words, we calculate the derivative:

An iterating loop then searches for the highest and lowest value in the array. To have the horizontal relative position of the line in the array, the two position values—on the horizontal x axis in the graphed image—are averaged. The position is put in memory for the next horizontal scan with a new image. This makes that the scan line does not have to span the whole image but only about a third of it. The scan line moves horizontally with the centre about above the line.

But this is not enough for accurate tracking. From the calculated line position, circles following the line are constructed, each using the same method (but with much more trigonometry calculations as the scan lines are curved). For the second circle, not only the line position but also the line angle is used. Thanks to using functions, adding a circle is a matter of two short lines of code.

The colour tracking is done by colour conversion to HSV, thresholding and then blob tracking, like explained in this excellent video. The colour tracking slows the line following down by a few fps but this is acceptable.

As seen in the video, afterwards all the scan lines and some info points are plotted on the input image so we can see what the robot ‘thinks’.

And then?

After the Raspberry Pi has found the line, it sends the position data and commands at 115,2 kbps over the hardware serial port to the Dwengo microcontroller board. The Dwengo board does some additional calculations, like taking the square root of the proportional error and squaring the ‘integral error’ (curvature of the line). I also used a serial interrupt and made the serial port as bug-free as possible by receiving each character separately. Thus, the program does not wait for the next character while in the serial interrupt.

The Dwengo board sends an answer character to control the data stream. The microcontroller also takes the analogue input of the SHARP IR long range sensor to detect the obstacles and scan for the container.

In short, the microcontroller is controlling the robot and the Raspberry Pi does an excellent job by running the CPU intensive line following program.

There’s a post on the forum with a more detailed technical explanation – but you will find the most important steps below.

Electrical wiring
Both devices are interconnected by two small boards—one attaches to the RPi and the other to the Dwengo board—that are joined by a right angle header connection. The first does with some resistors the logic level converting (the Dwengo board runs on 5V), the latter board also has two DC jacks with diodes in parallel for power input to the RPi. To regulate the power to the Pi, I used a Turnigy UBEC that delivers a stable 5.25V and feeds it into the Pi by the micro USB connector. This gives a bit more protection to the sensitive Pi. As the camera image was a bit distorted I added a 470uF capacitor to smooth things out. This helped. Even though the whole Pi got hot, the UBEC stayed cold. The power input was between 600 and 700mA at around 8.2 volts.

Grippers
Last year, I almost missed the first place as the robot only just pushed the can out of the field. Not a second time! Having this in thought, I constructed two 14cm long arms that could be turned open by two 9g servos. With the two grippers opened, the robot spans almost 40 centimetres. Despite this, the robot managed—to everyone’s annoyance—‘to take its time before doing its job’, as can be seen in the video.

Building the robot platform
To build the robot platform I followed the same technology as the year before (link, in Dutch). I made a design in SketchUp, then converted it to a 2D vector drawing and finally lasercutted it at FabLab Leuven. However, the new robot platform is completely different in design. Last year, I made a ‘riding box’ by taking almost the maximum dimensions and mounting the electronics somewhere on or in it.

This time, I took a different approach. Instead of using an outer shell (like insects have), I made a design that supports and covers the parts only where necessary. The result of this is not only that the robot looks much better, but also that the different components are much easier to mount and that there is more space for extensions and extra sensors. The design files can be found here: Robot RoboCup Junior – FabLab Leuven.

3D renders in SketchUp:

On the day of the RCJ competition I had some bad luck as there wasn’t enough light in he competition room. The shutter time of the camera became much longer. As a consequence, the robot had much more difficulties in following sharp bends in the line. However, this problem did not affect the final outcome of the competition.

Maybe I should have mounted some LEDs to illuminate the line…

KittenGroomer/CIRClean – data security for journalists and activists

Liz: Rachel Rayns, our Creative Producer, makes a habit of finding interesting people for us to talk to. She works with the creative industries on supporting their work with the Pi, and introducing people who aren’t the usual maths/physics suspects to computing – and while she does that, she discovers some really amazing projects.

We recently sent Rachel from Pi Towers to chair the panel at Makerversity on The New Hardware Revolution, where she met Maya Bonkowski, an interaction designer and security specialist. Maya, as it turns out, is a perfect embodiment of the sort of thing we mean when we talk about hardware revolutions. She’s been working with investigative journalists and hackers on a project called that’s called CIRClean in some incarnations and KittenGroomer in others, which sanitises USB sticks of malware and turns untrusted documents into clean, readable text. 

There’s a real need for this kind of application: if you’re an activist under threat from security forces, or if you’re an investigative journalist working with people who need to keep their data secure and off networks (especially in places with heavy penalties for criticising government), the USB stick is a vital tool – but it’s also a tool that’s very susceptible to malware.

Maya subsequently sent me a very long email about what they’re doing. It’s so interesting that I’ve reproduced it in its entirety below (with her permission). Over to Maya. 

Right, so where to begin.

Background:

Being a journalist in some parts of the world can be a rather serious and hazardous health condition. When the Syrian uprising began and the internet and mobile networks were turned off, all that was left were satellite phones. For a while, anyway. Until making a phone call became hazardous to the village with sat phone call signals being triangulated, possibly attracting an immediately subsequent carpet bombing.

Everybody loves kittens. Because kittens are loveable. But sometimes kittens need a new home, and then it becomes our job of finding a loving home for that kitten. Sometimes, unfortunately, homeless kittens will have all sorts of nasties and things that will itch and go bump in the night. They may take some work, but everyone loves kittens and they’re worth it.

What’s with the kittens? If you have a fact that guys with guns will shoot you in the face for even knowing about, then talking about kittens is possibly a far safer lifestyle choice.

In the Beginning:

My friend Quinn Norton, an OpSec/Journo who covers Anonymous and Occupy for WIRED magazine, launches into a rant: “So here’s my problem. Somebody gives me a USB key with something on it and I can’t f******* do anything with it. Nothing. It’s f****** useless and really I’ve got nothing.” More shouty ranty problem explanations followed.

The three main attack vectors against data security, and the sort of thing that makes Quinn’s work hard, are email attachments, unsecured (or poorly secured) LANs and USB keys. Apparently, enough dirty nasty things can be done at the block device level of plugging in a USB key, never mind such high level things as an infected document or program.

But, you really really want to know what’s on the key. Let’s say a north-African Royal Family has a chunk of the country’s annual budget allocated to them as a block percentage without any details. Someone’s promised you the full detail version of the budget including an itemised breakdown of the Royal Family spend. (Meet in this alley at night, and I’ll hand it to you through your open car window as you slowly drive by in the rain. Sadly, that one turned out to be a dud.)

The problem:

  • we need to extract the information in a safe way from USB key without plugging it into any computer that we might ever want to use again
  • you need an “airlocked” (non-networked) machine in case it tries to tell someone with guns about you
  • a second laptop is impractical and raises too many questions
  • Virtual Machines require competency to use them (and people are stupid/lazy)
  • Virtual Machines expose the Host computer to whatever is connected anyway.

The solution:

Extracting data from unknown data formats presents its own issues – MSOffice documents are the potential black plague carriers of data. PDFs files can be crafted to kill your system BIOS and brick your machine. Image files carry their own implications. But there are enough ways of translating and extracting data out of problem formats and putting them into functionally benign formats. This is the easy part.

But you still need a place to do all this.

So, there was this vision making the rounds in 2011/12 about creating an inexpensive computing platform that anyone anywhere in the world could use. You could hook it up to a TV and presto: you have a computer and can learn about computers. It could be anywhere and inexpensive enough to actually be anywhere, not just in a company office space. It could be in class rooms. It could be in private homes. It could be in your backpack. “Oh this? It’s a Raspberry Pi – it’s a cheap computer that enables anyone to get into computing. Would you like to see what it can do?”

Right, so the rPi vision as I saw it was: get these things everywhere to enable people without Macbook (or even anything near chromebook) budgets to get into computing. Get Africa computing. Get poor villages computing. Get students connected to the interwebs. Get it out there. Oh, and by the way, create an internationally available stable and consistent platform. And as a side effect of all of that, provide a plausibly deniable platform available anywhere. (Thank you!)

As it was in Autumn 2012, Raspbian had nearly everything needed software-wise. The installation of OpenOffice took care of a lot of the bulk of data format translations, and X was already installed (iirc) so it had a place to run. Because why would you have a word processor installed if you didn’t have a place to run it? Even if you only ever intend to run office apps in headless mode.

Next you want to make it do something on its own under controlled circumstances. The way it works is that you plug the key of questionable lineage into the top USB port. Then supply a clean/blank USB key and plug that into the bottom USB port. Then you turn it on and wait.

A couple of scripts buried as far down into the startup sequence as I could manage (and still have them work) trigger a number of things (or not):

  • if both USB ports aren’t directly connected to USB storage devices, be an rPi. Do rPi things. (Hide in plain sight.)
  • if they are both storage devices do something else.

If the system decides that the only things connected are 2 USB storage devices and then to clean data from one USB stick to the other, it recursively runs through all the files, directories (and treat archive files as directories, so unpack and process everything in them too), and partitions through the various document processing routines, writing clean data to the other USB stick.

This was the basis for the first prototype system. I’d recently received my first 256MB B model, and some cursing and swearing later it worked. It was even slower than the 512MB B model.

The Original Name: “KittenGroomer”

Apparently OpSec and InfoSec types spend or have spent too much time anywhere near 4chan; and while less questionable names where being explored around declawing, bathing, trimming and so on, the *Sec community branded it “KittenGroomer” within about 20 minutes of its conceptual birth and it stuck. The Journo/OpSec friend started promoting it before I’d opened the editor on the first Bash script. Before the project shifted from being “SEEKRIT!!” to open public visibility, a 4chan-inspired idea to ensure that you had a legit KittenGroomer was to stick a holographic PedoBear sticker across the SD card slot and the SD card. Never happened.

The prototype got a lot of attention from different people pretty quickly and it wasn’t long before someone working for the Computer Incident and Response Centre of Luxembourg (CIRCL) took some interest. In early December 2012, I put the first prototype in a bubble wrap envelope and mailed off. (They didn’t have any rPi’s yet.) A decision was made to de-SEEKRIT the KittenGroomer and eventually was presented to the Luxembourg minister responsible for information security. Some budget was allocated to refining the KittenGroomer and it became an official CIRCL project. There was talk of commercialising the project. Raf (the person at CIRCL I sent it to) put a stop to the commercialisation. It must always remain freely available. I never did get the trip to Luxembourg to meet the Minister.

OpenOffice was replaced with LibreOffice. (LO was forked from OO, then it was discovered that 25% of OO code did nothing, and was subsequently cut out – hopefully taking some security issues as well). A fast library used to convert PDFs into HMTL was reworked to work on armv6/7 (and even safely tested against some carefully caveated super nasty BIOS crushing PDFs Raf keeps under heavy lock and key).

I haven’t had much time to contribute in a while, but last October-ish we added audio as a status indicator so you don’t need a screen (we never did properly sort out the power management properly to keep the hdmi output from turning off). While it’s working it now plays 8bit 80s(ish) midi tunes until it’s done and shuts the system down. I curated the tunes so that they’re more or less in that curious/painful/delightful/odd/indeterminate aural appreciation space. The Nyan cat theme song was a request. That’s all I have to say about that selection.

What’s happened with it:

The KittenGroomer has been to a number of cryptofests, Raspberry Jams and the like, and has generally been well received. A number of seminars for journalists have been held and there are now KittenGroomer-equipped journalists out there. There might be a venture to package up and sell ready-to-go KittenGroomers (which I just found out about this morning). There’s still a lot of work that can/should be done on it.

The CIRCL project page:

http://circl.lu/projects/CIRCLean/

and their git repo:

https://github.com/CIRCL/Circlean

The main (Raf’s) git repo:

https://github.com/Rafiot/KittenGroomer

There’s more to come I’m sure. There’s already an otherwise clean Pizza Express napkin with a thorough sketch all over it.

The MagPi issue 26 – out now!

August’s MagPi, the magazine for the Raspberry Pi community written by the Raspberry Pi community, is out now. As always, it covers the whole spectrum of Pi users, from absolute beginners to people looking for challenges; and as always, it’s a free download.

This month you’ll find a continuation of the robot series that kicked off last month, adding voice control, facial recognition and speech to your home-made friend. There’s a fun persistence of vision (POV) magic wand project, an in-depth introduction to the new Model B+, and a great example of a dynamic art application for total beginners.

Our favourite project this month is Mashberry, a home brewery project which you can control using a TV remote. There’s lots more too: click on the image above (or here) to read the latest issue.

The MagPi team are always looking for volunteers to help produce the magazine: there’s a lot involved in getting a monthly publication ready beyond the writing and proofing. They’re always looking for writers and proofreaders, but if you’re interested in the production side of things in particular – that’s layout, typesetting, graphical work and testing – they’d especially love you to get in touch. If you can help, email editor@themagpi.com, or comment on their Facebook
page.

Ben’s USA Tour Dates

Today I fly to New York to start my Raspberry Pi USA Tour!

Thanks to everyone who submitted a request for me to speak for them while on my USA Tour. I’ve adjusted my route according to where most of the requests were located, and I’ve been organising dates with those who contacted me.

I’m travelling from New York City to Salt Lake City over two weeks, stopping at a different town each day. Most days I’ll either be speaking at an event or going in to a school or other organisation. Most events will be open to the public. The dates and towns are as follows:

Tue 05 Aug – New York City, NY
Wed 06 Aug - Washington, DC
Thu 07 Aug - Raleigh, NC
Fri 08 Aug - Charlotte, NC
Sat 09 Aug – Greensboro, NC
Sun 10 Aug – Duluth, GE
Mon 11 Aug – Chattanooga, TN
Tue 12 Aug - Talladega, AL
Wed 13 Aug – Somerville, TN
Thu 14 Aug - Louisville, KY
Fri 15 Aug – St. Louis, MO
Sat 16 Aug – Kansas City, MO
Sun 17 Aug - Kearney, NB
Mon 18 Aug – Denver, CO
Tue 19 Aug – Rock Springs, WY
Wed 20 Aug – Salt Lake City, UT

See my tour page for the full list of events with details and links to sign up. The page will be updated as information comes in, so if I’m coming to a place near you, keep checking back for details.

If I’m passing through your area then come and see me speak or get in touch to see if we can meet up!

Liz adds: Ben is currently at the airport, where, according to Twitter, he is trying to be humorous by signing on to the WiFi network  as Edward Snowden. If we don’t get a call asking us to come and bail him out within the next couple of hours we’ll assume he made it onto his plane.

Mathematica 10 – now available for your Pi!

Liz: If you use Raspbian, you’ll have noticed that Mathematica and the Wolfram Language come bundled for free with your Raspberry Pi. (A little boast here: we were only the second computer ever on which Mathematica has been included for free use as standard. The first? Steve Jobs’s NeXT, back in 1988.) 

Earlier in July, Wolfram Research announced a big update to Mathematica, with the introduction of Mathematica 10. Here’s a guest post announcement from Arnoud Buzing at Wolfram about what the new Mathematica will offer those of you who use it on your Raspberry Pi. Over to you, Arnoud!

In July, we released Mathematica 10, a major update to Wolfram’s flagship desktop product. It contains over 700 new functions, and improvements to just about every part of the system.

Today I am happy to announce an update for Mathematica and the Wolfram Language for the Raspberry Pi, which bring many of those features to the Raspberry Pi.

To get this new version of the Wolfram Language, simply run this command in a terminal on your Raspberry Pi:

sudo apt-get update && sudo apt-get install wolfram-engine

This new version will also come pre-installed in the next release of NOOBS, the easy set-up system for the Raspberry Pi.

If you have never used the Wolfram Language on the Raspberry Pi, then you should try our new fast introduction for programmers, which is a quick and easy way to learn to program in this language. This introduction covers everything from using the interactive user interface, basic evaluations and expressions, to more advanced topics such as natural language processing and cloud computation. You’ll also find a great introduction to the Wolfram Language in the Raspberry Pi Learning Resources.

This release of the Wolfram Language also includes integration with the newly released Wolfram Cloud. This technology allows you to do sophisticated computations on a remote server, using all of the knowledge from Wolfram|Alpha and the Wolfram Knowledgebase. It lets you define custom computations and deploy them as a “instant API” on the cloud. The Wolfram Cloud is available with a free starter account, and has additional non-free accounts which enable additional functionality.

Check the Wolfram Community in the next couple of weeks for new examples which show you how to use the Wolfram Language with your Raspberry Pi.

Introducing Raspberry Pi HATs

Just over two weeks ago, we announced the new Raspberry Pi B+ with immediate availability. We’ve been very pleased at the response from the community and press about the B+, and most people seem to appreciate why we decided to evolve the Model B in the way we did – lots of you have been in touch to tell us how much you’re enjoying your new B+.

There are many great new features built into the B+, but today we want to talk about one new feature we are particularly excited about.

One of the brilliant things about the Raspberry Pi has always been the ability to attach physical hardware to the Raspberry Pi’s GPIO (General Purpose Input/Output) connector. There are so many third party add-on boards that attach to the Raspberry Pi and extend its functionality: motor controllers, LEDs, buttons, sensors, microcontrollers, LCDs, ADCs and DACs; you name it, someone has almost certainly created an add-on board that makes it usable with the Raspberry Pi.

Model B’s 26W vs Model B+’s 40W GPIO connectors

On the Raspberry Pi models A and B, the GPIO connector has 26 pins. Users attaching an add-board to the model A or B Pi usually have to work out which drivers are required for their specific board, and then edit the relevant Linux files to make them load at boot time before the board is usable (or load them by hand from the command line). The Raspberry Pi has no knowledge of whether it has a board attached or not, and the various drivers, when loaded, will simply assume that they can make exclusive use of the GPIO interface. Most of the time this all works OK, but it can be a bit challenging for new users. Linux drivers blindly assuming GPIO pins are available can also occasionally cause confusion.

The Raspberry Pi B+ has been designed specifically with add-on boards in mind and today we are introducing ‘HATs’ (Hardware Attached on Top). A HAT is an add-on board for B+ that conforms to a specific set of rules that will make life easier for users. A significant feature of HATs is the inclusion of a system that allows the B+ to identify a connected HAT and automatically congifure the GPIOs and drivers for the board, making life for the end user much easier!

Before we go any further, it is worth noting that there are obviously a lot of add-on boards designed for the original model A and B boards (which interface to the original 26 way GPIO header). The first 26 pins of the B+ GPIO header are identical to those of the original models, so most existing boards will still work. We are not breaking compatibility for existing boards; we’re creating a specification that B+ add-on board designers can follow (if they so wish), which is designed to make end users’ lives much easier.

So what is a HAT?

B+ sporting a (mechanical sample of a) HAT and showing camera and display connections

In a nutshell a HAT is a rectangular board (65x56mm) that has four mounting holes in the (nicely rounded) corners that align with the mounting holes on the B+, has a 40W GPIO header and supports the special autoconfiguration system that allows automatic GPIO setup and driver setup. The automatic configuration is achieved using 2 dedicated pins (ID_SD and ID_SC) on the 40W B+ GPIO header that are reserved for an I2C EEPROM. The EEPROM holds the board manufacturer information, GPIO setup and a thing called a ‘device tree‘ fragment – basically a description of the attached hardware that allows Linux to automatically load the required drivers.

What we are not doing with HATs is forcing people to adopt our specification. But you can only call something a HAT if it follows the spec.

So why are we bothering with all this? Basically, we want to ensure consistency and compatibility with future add-on boards, and to allow a much better end-user experience, especially for less technically aware users.

The HAT specification is available on GitHub for those wishing to design add-on boards for the B+. As previously explained, there is no requirement to follow the HAT specification, but we encourage people to think about following it if possible, as it will make the world a better place for end users.

One final bit of good news:  we have used a surface mount connector on our internal prototype HAT which works very nicely. As you can see from the pictures it solders to the top of the board and then fits over an extension header (the extension header pins push through the HAT from underneath). As the extension headers push through like this it is possible to either use a short, flush mounting extension or a version with longer pins that poke out above the HAT and allow further access to the GPIO pins for debugging.

HAT using extender with longer pins

For HAT designers wanting to use these connectors, we have secured discounted pricing through Toby Electronics. The connector part numbers are:

Toby tell us they are getting stock in now, which should arrive for the 5th August.

Please post technical questions about the specification to the forum.

Sonic Pi Competition

Coding music on a Raspberry Pi with Sonic Pi has quickly become a great way to learn programming concepts and to pump out some thumping beats. Last year I worked with Dr Sam Aaron, live coder and academic at the University of Cambridge, to teach KS3 pupils text-based programming on Raspberry Pis as part of their ICT & Computing lessons. Since then Sonic Pi has proved incredibly popular in classrooms worldwide. The scheme of work we used is available for free in the ‘Teach’ section of our resources for any educator wanting to teach computer programming in a fun way.

Since our classroom collaboration, Sam has been busy working on Sonic Pi version 2.0 and together we have been wowing attendees of Picademy with the potential of Sonic Pi for the classroom. We have also been working on Sonic Pi: Live & Coding, a digital research project funded by NESTA to turn a Raspberry Pi into a musical instrument with Sonic Pi, working with schools, artists, academics and the Cambridge Junction, which will culminate in a Sonic Pi: Live & Coding Summit this November. In fact, this week at the Cambridge Junction, 60 children have been participating in the project, having coding music battles, and jamming with musicians.

Push Sam’s buttons and watch his eyes pop at Sonic Pi Live and Coding!

To coincide with the summit, we will be launching a Sonic Pi: Live & Coding competition in September to find the best original sonic pi composition created by a child or young person in three age categories. We will have 5000 Raspberry Pis to give away at random for those who take part, and the semi-finalists of the competition will be invited to perform their original work live at the summit in November in front of an audience and panel of judges to potentially be crowned the first ever Sonic Pi Competition winner!

So what are you waiting for? Download Sonic Pi version 2 for your Raspberry Pi by following these instructions, and then take a look at the Sonic Pi 2 article by Sam in the MagPi magazine, and our new Sonic Pi Version 2 Getting Started resource. Take this opportunity to practice and get a head start on the competition!

Get your practice in for the Sonic Pi version 2 competition with our new resource.

Seiten