Code a space adventure game in this Python programming book published by No Starch Press.
06 March 2015
Thanks to TechnologyWillSaveUs, my Code Club had a set of DIY Gamer Kits to assemble and solder, which we recently did in a half-day session in the school hall. The guide says it'll take about an hour and a half to assemble, but it took me a bit longer than that, and for the children it was the first time they'd done any soldering. We found that half a day was the right amount of time to set aside for it, including introducing the children to soldering and ensuring we worked at a steady but safe pace.
The DIY Gamer Kit is an Arduino-based handheld games console that has an 8x8 pixel matrix display, four control buttons, a light sensor and infrared communications. It uses a standard 9V battery for power. When you get it, it comes in kit form, as a white circuit board and components that need to be soldered to it. The Arduino clips to the underside of the board, and there are plastic coverings that screw to the front and back.
One of our main concerns was to make sure that the children were safe using the soldering irons. The teacher told me that they routinely warn children that the glue guns are hot and they shouldn't get any glue on them, and some children immediately test that by putting a dollop on their hand, which then blisters. Given how much hotter the soldering irons are, we couldn't run any similar risks, so the teacher began by giving the group a serious talk about safety. They were excited and we wanted to tap into that enthusiasm, but also needed to ensure that everyone proceeded carefully and safely at all times. During the session, nobody was hurt, and everyone had a good time.
The other thing we did was to separate the soldering tables and to restrict the number of people there at any one time. We had a table for each kit where the components were kept, and when something was ready for soldering, the children went over to the soldering station on the other side of the hall. That ensured there wasn't any bustling around the soldering station.
Before we got into the kits properly, we did a practice solder session using some bits of old wire. We gave everyone a chance to try soldering the wires together, so they could see how it was going to work, get a feel for the solder and the soldering iron, and gain confidence before they were using the kits. We divided the group in two for this, and while one half was soldering, the other half was using a card game to learn what the different bits of the kit did.
When assembling the kit, we used the manual but found we had to make a few changes to the process. Some of the components were pre-soldered on our board (which was a huge time saver, without detracting from the experience). I found that I had to do section 7 of the manual (integrated circuits) before fitting the LED display (section 5), otherwise the display gets in the way. We put together an A5 booklet based on the manual, but changed the order of some of the sections and excluded some others to fit the kits we had. When it came to fitting the integrated circuits, I didn't know which way they should go in, but my friend Marcus (who also gave me a soldering refresher class when I was preparing the session) told me you match the semicircle shapes on the chips with the semicircle shapes on the sockets.
The session went extremely well. "This is like the best science lesson ever!" one of the children said, and there was much excitement when they switched the kits on and found they could play Snake. Out of our kits, only a couple didn't work. On one of them, the children had soldered two resistors in the wrong places and we haven't been able to get them off yet. Unfortunately, these were by far the best soldered joints of the whole session! For the other kit, we haven't worked out why it's not working, but we'll take a look and check it. Given the complexity of the kit and the inexperience of the children, we were very happy with the outcome, and everyone got to play a game and experience building the kit.
For the next step, we'll be programming them, but the school is also now exploring more opportunities to do electronics projects following the success of this session, and the enthusiasm of the children for it.
The DIY Gamer Kit has recently been nominated as a design of the year at the Design Museum, and it is a great device. I took it along to the Raspberry Pi Birthday Party to demonstrate, and it was a popular exhibit. If you're looking for a fun soldering project and a first Arduino project, it's well worth taking a look at it.
Thank you to everyone who made this possible, including TechnologyWillSaveUs, Code Club, Marcus, and the teachers and facilities manager who helped run the session.
I'm sure the children will remember the day they got to build a games console for a long time.
04 March 2015
Last weekend the Raspberry Pi community came together in Cambridge to celebrate the quirky computer's third birthday. It's achieved an incredible amount in its short lifetime, helping to transform education and finding its way into schools, homes and offices all over the world. Perhaps its greatest achievement, though, is the community it's built, and the birthday party gave a real taste of that. People flew in from Germany and France, and travelled from all over the country to join the fun.
On entering the building, we were greeted by a giant throne with an arch of balloons over it. From tiles provided, you could assemble a placard and sit on the throne to be announced as "the messy inventor of wonderland" (Pete Lomas's choice of words) or something similar. This was one of the many Raspberry Pi projects on show during the weekend. There were lots of robots, and the CamJam obstacle course was available for testing their mettle. There was an Astro Blaster arcade cabinet that had been lovingly restored as a desktop unit powered by a Pi, and a handheld Spectrum emulator. You could have your photo taken in bullet time using a ring of Raspberry Pis with cameras, and find out how naughty or nice you were with an end-of-the-pier style attraction that scanned your hand. The Easter bunny was present too, pooping out Mini Eggs when you pressed a button. My co-author Mike Cook brought along several of his projects, including a game where you have to vigorously shake a real bottle to empty the sauce on screen, and a random jazz generator. I was delighted to have a chance to meet him, given that we'd worked on three books together without previously crossing paths in the real world.
There was a programme of workshops. On the Saturday, I helped to run a Scratch hackathon, where about 20 children and young people coded games and wrote programs that controlled LEDs from the CamJam EduKit. We had a show and tell session afterwards, where many of them shared their creations in the main lecture theatre. It was great to see what they could achieve in two hours, without ever having done any electronics on the Pi before. If you couldn't make it to the session (or even if you could and want to explore more), you can find my guide to getting started with ScratchGPIO and the CamJam kit here.
Phil Atkin gave a great presentation of his synthesiser software, showing how he'd recreated the sound of an expensive Moog synth using the Pi and some highly optimised code. Now that the Raspberry Pi 2 has come out, he says there will be lots of original Pis that people don't need any more. His hope is that they can find their way into schools together with his synth software. Since music is one of my hobbies too, I'm very much looking forward to the general release of the software.
Kieron Spinner ran a workshop on Node.js, with a demonstration showing how it can be used to enable an LED connected to the Pi to be remotely controlled over the web. As a prototype for the Internet of Things, this was a great demonstration, and he's keen to collaborate with others who are similarly excited by the technology's potential.
On Saturday evening, there was a party with balloons and cake and raspberry beer and games and music and oh, so much more! It really was a great celebration, and was generously supported by the sponsors who donated prizes. In pass the parcel, everybody won. My prize was a motor controller board from Ryanteck, which I look forward to trying out! Everyone left with a party bag too, which included a free ebook from O'Reilly, stickers, cables, Magpi magazines, pens and more. I enjoyed the music performance, in which Sam Aaron live-coded with Sonic Pi, accompanied by a guitarist.
The highlight for me was having an opportunity to chat to people, which I feel like I did almost continuously for two days! I got to meet many people I know virtually for the first time, see some people I know again, and meet some new people. Sunday was a particularly good day for this because I had a show and tell stand where I was showing my Minecraft Maze Maker, Scratch burglar alarm, some Scratch games and a selection of Raspberry Pi books. It was lovely to meet some existing readers and to be able to introduce the books and even the Raspberry Pi to some others. While the event was driven by Pi die-hards, it was wonderful to see people there who were buying their first Pi and exploring what they could do with it. Thank you to everyone who visited the stand, especially with so much other stuff going on.
I took the opportunity to do some shopping too, and bought some add-ons from Pimoroni. It was nice to see some businesses that had been established around the Raspberry Pi, showing how it has helped to drive enterpreneurialism, especially among young people, a couple of whom have gone from university to running a Pi-based business.
There are so many people to thank, especially Mike Horne and Tim Richardson who organised the programme, Lisa Mather who orchestrated the superb prizes and goodie bags, the many marshals, the Raspberry Pi Foundation and all its members who made everyone welcome and the sponsors who generously supported the event.
I had a fantastic time, but with so much going on, I know that I missed a lot of what was on offer. If anyone's looking for a project for their Pi, I have a suggestion. You'll need a comprehensive understanding of the Pi, electronics, and the space-time continuum. I know I'm asking a lot, but if any of you can build a time machine in time for the next party, it would be mighty useful. In fact, given it's a time machine, why not build it in time for the last one? How about it, eh?
© Sean McManus. All rights reserved.
Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!
Code a space adventure game in this Python programming book published by No Starch Press.
Learn to make games and other programs in Scratch, and make a web page in HTML. Highly interactive book for 7-10 year olds.
Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!