Thursday, April 01, 2010

Processing

Processing’ looks very interesting programming environment - I have been aware of it for some time but not really paid it any attention. Until now, that is.

The reason for my new interest is really down to my son. He had his 15th birthday last week and, like many teenagers (and us older ones), he is really into computers, games consoles (he can talk all day about PS3 and XBOX), and cars. But he has never shown any interest in programming. Which is a shame because I think he could be quite good at it – he is good at maths (much better than I was at his age), and is careful and logical (well, sometimes).

So, with all that in mind, I went searching for a birthday present for him. And I found this thing called an 'Arduino' - a microprocessor based I/O board that can be connected to a PC (or Mac), can be programmed, and interacts with the physical environment by means of various sensors, motors, bluetooth, ethernet, and so on.

To begin with, he did not appear to be that interested – it was the one birthday present that was left on the side, unlooked at. His other gifts were much more exciting. I wasn’t disappointed and I figured it would just be a matter of time before his curiosity got the better of him. And I was right. A couple of days later I noticed that the box had been moved. It’s contents had been layed out on his desk. I had a chat with him and, as expected, he said he was curious but really didn’t know what it was or what he should do with it. So, with my help/guidance, it was quickly set up, the Processing environment installed on his computer, the Arduino connected, and a few LED’s wired up. Within minutes we had a short program written that did nothing more exotic that flash the LED’s once a second. I then asked him what he would do to make the LED’s light up for 1 second but go out for just half a second. He soon had that figured and tested. His first computer program.

And I left it at that. There’s nothing more uncool when you are a teenager than having your dad show you everything.

The next day when I got home from work, he showed me how he had rewired the Arduino board to include a Light Dependant Resistor. And he has changed the program to to read the analog input from the LDR and use that value for the delay time in the LED flashing – so now he has a variable flash rate dependant on the ambient light in the surround environment. How good is that!

I think his next idea is to add a Heat Sensor, and he has already told me that he want to get hold of a accelerometer and a tilt sensor. Perhaps he is hooked. What have I done?

Blog Watch