Using an IR receiver diode and Arduino Nano I made a very simple program to read inputs from an old Toshiba DVD remote (which I decoded using the same receiver). Both the receiver and the remote operate on a 38kHz carrier frequency. This is important.
Its very basic–If I see code 0xA25D807F, I turn on LED 1. Code 0xA25D40BF is button 2 (LED 2) and so on. Code 0xA25D48B7 is power (although sometimes it sends 0xBF27B8D8, for whatever reason), so I set the power button to toggle all lights of or on. The Toshiba remote was useful because it uses the NEC IR protocol, and the IRRemote library can decode its output to hex values (that is to say, I didn’t have to take much time to figure out very long raw dumps of the remote control output).
The frustrating part of this test was getting the IR codes. For a long time I was holding the remote very close to the IR receiver (within a foot or two) and getting different codes every time I pressed a button. As to why this happens, I still don’t know, but I’m sure it has to do with wavelengths and usable rage.
Arduino seems like a great way to teach kids what can be done with software in a tangible way. While they’re too young to understand C code, I try to take the time to show them how things work and talk about how we might change the way a program acts. Kids are curious about such things, with a natural interest in this kind of stuff. I can see how Arduino would be a fantastic teaching tool even for elementary school children.
Another great thing about these videos is that everyone can see our awesome Easter table cloth.