Raspberry Pi is 6 years old this weekend and there are #PiParty events going on all around the world. I went to the Leeds Raspberry Jam party at Swallow Hill school in Armley/Wortley run by Claire Garside of Foundation for Digital Creativity and her fab team.
There were all kinds of things to do: programming Minecraft with Raspberry Pi and PiTop cases, robot wars with the Crumble Controller, Raspberry Pi tutorials with Scratch, and a live web competition with Raspberry Jams from Manchester, Hudderfield, and Hull. The braniacs from UKSTEM were also there with their Control Freak activities. There was also Raspberry Pi cake!
Thanks to Premier Farnell (who are based nearby in Armley) people at the workshop could take home a copy of the excellent book Adventures in Raspberry Pi by Carrie Anne Philbin — 9 awesome Raspi projects. There were lots of other magazines and resources there to take and borrow and of course many different people of all ages to discuss projects with; this is one of the great things about Raspberry Jam events.
Programming the Crumble using a block editor
I tried my hand at programming one of the 2-wheeled drawing robots powered by the Crumble Controller, a tiny microcontroller a bit like a micro:bit that lends itself to physical computing applications. I was interested in the experience for a complete novice (although I have 20 years’ experience of programming commercial software, I had not before today programmed using a block-based editor). I wanted to see what the block-based approach feels like, particularly as we’re expecting to use block-based programming for our CodeMill training programmes in the near future.
The code-test-fix cycle s very rapid. To “run” the code, you simply press Play in the Crumble editor and it squirts the code down to the Crumble robot in half a second and the robot starts moving. This makes for a nice, rapid feedback loop for code changes.
The constraints of the block editor make for very rapid decisions about what algorithm is possible to use to achieve a goal. In this case, we were trying to draw the Raspberry Pi logo (a raspberry) using a whiteboard marker pen held in the robot chassis. I found that — compared to learning a full new language — the pre-defined blocks really help to constrain the “search space” for a solution and helped me to focus on the problem rather than worry about syntax and language features.
In the absence of any test-driven features, I began with some simple robot movements to assess how the robot moved (it turned out that the wheels slipped a bit on the whiteboard surface, so we had to compensate in code). After a while, though, I found that the program had become difficult to read and I really missed both comments and (more importantly) the ability to define functions or methods to structure the code. I think that encouraging clean code early on is key to success with coding, so I’m looking forward to using other block-based editors (like MS MakeCode) that support constructs like functions. In the end, my Raspberry Pi logo was reasonable (could be better!):
The enthusiasm and excitement around Raspberry Pi, micro:bit, Crumble, CodeBug, and similar small computing devices is really remarkable. In the 6 months since we’ve been running CodeMill digital skills meetups, I’ve been really impressed with how accessible these devices are to such a wide range of people. It’s a refreshing change from the world of business software systems! Hats off to Claire Garside and her team for a great #PiParty.