Physical computing is a fantastic way to catch learners’ imaginations and give them the ‘wow’ that you don’t always get when programming purely on screen. First of all, what is physical computing? Basically, it is a way of using programming to interact with, sense and control something in the real world. This could be a robot, a camera, a weather station, or in this case, LEDs (light-emitting diodes). Physical computing gives learners’ coding a real purpose, immediate feedback and a true sense of satisfaction when it works.
In schools, where there is ever-increasing time pressure, physical computing makes purposeful links across computing, science, design, and technology. This makes it ideal for the new curriculum for Wales, particularly the science and technology AoLE (Areas of Learning & Experience).
With Christmas nearly upon us, physical computing is the ideal way to bring some festive cheer to your coding projects. Nothing says ‘Merry Christmas’ more than a barrage of blinking LEDs! In school, we focused on using two devices with different age groups. With younger children, we used the BBC Microbit. Utilising its built-in LED matrix and visual block coding platform, children in Year 1 were able to create interesting and engaging decorations.
Rudolph the long-necked reindeer!
With older children, I started to introduce the GPIO pins on the Microbits. Focusing on the five large pins. We built a set of traffic lights first using a breadboard (a great way to build circuits without the need for soldering) and worked in groups to develop the code that would give them the correct sequence.
(Discussing the correct sequence for a set of traffic lights)
During our coding sessions at Sony UK TEC, we took this a step further using Raspberry Pi computers. We built the circuit in a similar fashion using the GPIO pins on the Pi, but the children coded the sequence first using Scratch and then in Python. They then compared the languages and discussed the pros and cons of each and which they preferred. It was interesting as the class was often split down the middle and the reasons given were valid and insightful. Some preferred Scratch as the block library allowed them to build the code straight away. Whereas others preferred Python as they felt the code made more sense with the location of any errors indicated.
(Comparing Scratch to Python)
The children then added a variety of coloured LEDs and coded the sequence they wanted. Some chose something as simple as a flashing, red-nosed Rudolph. Others decorated a cardboard Christmas tree. If this proved too complex, several pre-built boards were available including a Christmas Tree and snowman.
Image Source: pihut.com
The children thoroughly enjoyed building and programming with LEDs and as a first step in physical computing, you can’t beat some festive decorations! With a bit of practice, you could even create something like this: