Arduino and son

Standard

Not quite sure where to blog this, so it’s going here on our rather unloved personal/food blog (for a better loved blog you might want to have a look at the stuff Damyanti has been doing over on Overdue Books)

For a while now I’ve been wondering how I might introduce Bryn (now 4) to the concepts of computer programming. I’d looked at all the usual ‘programming for kids’ stuff, and had a look at Scratch, Hackety Hack and other languages aimed at children learning to programme, but felt this would all be difficult for a 3-4 year old to get to grips with – especially as he isn’t yet reading and has only recently started writing – although he can recognise letters and numbers.

I did find a couple of approaches that were fun for both of us which were the Lightbot game and a Constructa-Bot (a programmable ‘robot’ aimed at the primary school market) – both of which require you to plan a series of moves, and programming them into a robot (one virtual and one physical). Lightbot was fun, but got too hard too quickly. The Constructa-Bot works well, and I think will get more use in the future – partly this is about thinking up ‘games’ to play with the bot.

At the same time I’ve had it in mind for a while to get myself an Arduino kit to play with. Arduino is an “open-source electronics prototyping platform” – essentially allowing you to build electronics circuits – and write software to run on it. A really simple example of what you can do is wire up a circuit with an LED and make it blink on and off as detailed at http://arduino.cc/en/Tutorial/Blink. To encourage me, Damyanti got me a book on programming Arduino for Christmas and so I ordered an introductory kit from oomlout.

While the Arduino was for me, and I hadn’t even thought of doing it with Bryn – I guess I assumed it would be fiddly and a bit difficult – it has already proved a great way of engaging Bryn with basic concepts of electronics, programming and just the basic idea that these are tools that can be used to create.

So far we’ve done two little ‘projects’:

Colour wheels

This was the first one we did together. Damyanti drew some circles on a piece of card, and Bryn decorated them with lines, squiggles, spots, spirals and stars. They did this while I worked out how to wire up a motor, and got a programme (or ‘sketch’ as they are called for arduinos – no idea why) written that would just spin the motor for a number of seconds.

Having got this working we attached the ‘wheels’ to the motors spindle and watched what happened to the colours and patterns as it span around. Bryn was immediately interested in the circuit and how the motor was controlled – and once I’d got the cursor in the right place in the programme he could type in numbers to set the length of time the motor would spin for each time, and then press the button to upload the sketch to the Arduino board.

Traffic Lights

After the colour wheel project both Bryn and I wanted to do something else. I asked for suggestions on Twitter and I think it was @bencc who suggested traffic lights – which immediately seemed like an ideal project. I had red and green LEDs, and Bryn has plenty of toy cars, and I knew that even my basic Arduino knowledge could manage a simple circuit and programme which would change the lights at set intervals.

This time Bryn was keen to help with the whole circuit – so we did this together, and this worked better than I thought. Although wiring stuff up (using a ‘breadboard’ to plug the components into) proved a bit fiddly, and some of the components I had to do, Bryn was able to plug the connecting wires in with only a very little help.

I’d got the (very simple) programme ready, and we uploaded it, and played around with the time between the lights changing – doing some very very short times to get a flickering affect, and longer times that might be more suitable for traffic lights.

The next stage of the project was to make a box for the Arduino to slot into to make the ‘traffic lights’ – Damyanti found a suitable box, cut some holes in the right places and got it ready for Bryn to decorate – we got out a road that Bryn and Damyanti had made a while ago and some toy cars – and you can see the results in the picture above.

Next…?

The challenge is to think of projects that are fun, engaging, and within my ability to carry out (as well as Bryn’s!) – any suggestions welcome :). I love the way the two projects above combine fun, creativity and technical concepts.