One of the best gifts you can possibly give your child is an education in computer programming. Not only is it a fun, intellectually-challenging pastime, but it’s also a solid guarantee of a future career in an industry that not only offers competitive wages, but also promises to provide stable and steady employment.
One of the best tools for teaching coding to kids is the Raspberry Pi. At $30, these are cheap enough for most parents to buy. Using the built-in GPIO (General Purpose Input/Output), they can attach electrical components, and build their own physical computing devices. Because you’re unlikely to use a Raspberry Pi as your main computer, your children can experiment and play without the fear of causing damage to your system or your documents.
But if you aren’t a coder, and don’t know your Python from your Prolog, you might not know where to direct your children to. If that sounds like you, don’t worry. Here’s five simple activities to teach your child how to code with the Raspberry Pi.
Get Stuck in Some Raspberry Jam
Raspberry Jams are community-lead meetups for people to learn (and teach) about the Raspberry Pi. Although many tech-events are adults only, Raspberry Jams tend to be open to enthusiasts of any age. Every single Raspberry Jam I’ve ever attended has had lots of children and teenagers in attendance.
The vast majority of the Raspberry Pi meetups are located in the UK, although there are a handful in the US, as well as in Canada, India, and the Ukraine.
What makes these events great is that they’re generally directed by adults who have experience using – and building for – the Raspberry Pi. Your children won’t be left without guidance. They’ll be getting hands-on advice and instruction. They’ll learn how to write code, and how to use the various Linux operating systems that are commonly used on the Pi.
Plus, there’ll inevitably be lots of other young people there, making this a fun and social event for all ages.
Teach Them Scratch
Plenty of children are learning to code through Scratch. This project from the Massachusetts Institute of Technology takes the most fundamental concepts of code, and turns it into a user-friendly, drag-and-drop experience.
Things like conditionals (where you perform a task if something meets a criteria) and iteration (where you repeat something for a specified number of times) are turned into bright, colorful jigsaw pieces, which gracefully snap into place. The results of the code are played out in front of you, as an animation or a rudimentary game.
Your child will never get a job writing Scratch code for a living, but that’s not the point. It’s to take code, and turn it into something beautiful and visual, and ultimately make it less intimidating for beginners. For teaching the fundamental logic of coding, there’s nothing quite like it.
If you’re looking for a good starting place with Scratch, take a look at the website of the Raspberry Pi Foundation, which has published a number of Scratch projects for download. These tend to be appropriately aged, and come with clear and concise documentation.
The next step up from Scratch is Python. This was first developed in 1991 by the Dutch programmer Guido Van Rossum, as a simple educational programming language. Unlike other programming languages, Python was designed to be easy to read, and simple to write. It has an interpreter (this is the thing that actually runs the code) which came with strict rules that forced people to write good, clean code. The end result was that Python became a huge success not only in education, but also in industry.
Right now, every Raspberry Pi ships with Python, so there’s nothing to download.
Largely due to the success of the Raspberry Pi, there’s also a plethora of Python learning material aimed at children and young people. If you’d prefer learning through a book, No Starch Press have Python for Kids: A Playful Introduction to Programming, by Jason R. Biggs. One of the great strengths of this is that it’s written in a simple, approachable style, and has enough illustrations to keep kids interested.
I scoured YouTube for child-friendly Python video tutorials, but I’m yet to find one that I can recommend. Many either just aren’t that good, or are just inappropriate. If you happen to have any you can recommend, tell us about it in the comments below.
However, the Raspberry Pi foundation has released a number of Python projects, which offer an unintimidating look at the language. Furthermore, MakeUseOf will soon be releasing a guide to the Python programming language, written by yours truly. To make sure you don’t miss it, consider signing up to our mailing list, or following MakeUseOf on Facebook or Twitter.
Play with Minecraft Pi
When I was 7, Stretch Armstrong dolls and Action Men were all the rage. Now, it seems like the current childhood obsession is Minecraft, from Swedish developers Mojang (now a part of Microsoft).
Minecraft is essentially digital Lego. Rather than construct a pretend castle or spaceship with plastic bricks, all the action is done on a computer screen with virtual bricks. There’s no real limit to what you can build with it. Your creations can be as big, or as small as you want. They can be as simple, or as ambitious as your imagination allows.
There’s an expansive online community of people sharing their own inventions, scattered around Twitter, Reddit, and YouTube. There’s even some Minecraft vloggers who have hundreds of thousands of subscribers, believe it or not. Trust me when I say that Minecraft is seriously big.
In February 2013, Mojang released a version specially designed for the Raspberry Pi. In addition to being free of charge, this was designed to be able to run on the limited hardware of the Raspberry Pi, and had an API (Application Programming Interface) that allowed people to program within Minecraft using Python.
This has resulted in Minecraft being used as a vehicle to teach programming, because not only is there the irresistible appeal of Minecraft, but you can see your results play out for you in a familiar virtual world.
Learn Electronics with Sense HAT
If you want to teach your children about electronics, and building for the Internet of Things, a great place to start is with a Sense HAT. This add-on board for the Raspbery Pi retails for about £23 in the UK, or $50 in the US, and slots into the built-in GPIO slots. It includes an 8×8 RGB LED matrix; a five-button joystick; and a raft of sensors, including a gyroscope and an accelerometer. There’s even a Python library, which grants easy access to all the components included in the Sense HAT.
This is, essentially, all you need to build a number of basic physical computing projects. As with Scratch and Python, the Raspberry Pi foundation has published a number of sample projects. These offer a great starting point, and illustrate the capabilities of the Sense HAT.
When your children eventually graduate into more complicated things, such as Arduino, you might want to consider checking out the 1Sheeld, from Egyptian startup Integreight. This board allows you to build Internet of Things products, using the sensors and radios built into a standard Android smartphone.
Programming Is Easy with a Pi
Few things have made it easier to learn to code than the Raspberry Pi has. Have you found a great way to use them in coding education? Tell me about it in the comments below!