A few weeks ago, I got my hands on an Arduino starter kit. The Arduino is a microcontroller that is capable of doing a lot of really cool things. The starter kit included the Arduino board, a collection of electronic parts (LEDs, a breadboard, wiring, resistors, potentiometers, an LCD screen, and some other things), and a book to start learning the programming. The Arduino is programmed using a modified version of C++, so learning to program it means that your programming skills can be easily transfered elsewhere.
Learning to program the Arduino is not hard, and it’s a lot of fun. The first thing you’ll learn is how to make the LED on the board blink. It’s very simple, but seeing it do what you tell it to do is exciting.
I’ve gone about half way through the book, putting together example projects. Once I got half way through, I started having my own ideas that I wanted to try. The projects I’ve done include: A “Spaceship interface”, “Love-o-meter”, Color mixing lamp, Mood Cue, Light Theremin, and a Crystal Ball. The Spaceship interface is the first project, to give you the basics of hooking up buttons, LEDs, resistors, and working with inputs & outputs in the code. It’s very simple, just a couple lights that change when you push the button. When you’re done, it looks like something you’d see in an old sci-fi movie.
The Love-o-meter is simply a temperature sensor connected to some lights. The warmer it gets, the more lights turn on.
The color mixing lamp is really cool. It’s an LED with red, green, and blue elements in it. You can make any color you want by mixing the light from the elements.
The mood cue uses a stepper motor to point an indicator. The purpose is to learn the use of the stepper motor.
The light theremin is interesting. It uses a light sensor, and outputs a varied pitch tone based on the amount of light it sees.
I modified the code for the Crystal Ball. It’s supposed to be like a “magic 8 ball”. You program it with 8 possible answers and have a switch that’s activated by turning the board over. I never got the switch to attach to the breadboard because the pins are too short, so I just wired in a pushbutton switch instead. Instead of 8 random answers, I put in 8 random trivia facts. It was a fun project to learn how to get an LCD screen working.
Beyond that, I’ve been working on a few other projects that came to mind. One of them is a timer to control two lamps in my living room. Right now those lamps are on timers and come on in the evening, and turn off around 10:30. However, I have to adjust the timers every few weeks to follow the changing sunset time. My new timer will have a clock built in, and be able to calculate when sunset is, so I won’t have to adjust for it any more.
While contemplating that project, I found this. It’s a goofy little project, but it does almost exactly what I want my timer to do. The only difference is that I will drive a relay instead of an LED.
I emailed the guy who made that and asked if he could point me in the right direction for tracking sunrise/sunset times, since that is still a bit beyond my current abilities. He gladly shared his code with me, and has been very helpful in getting it modified to suit my needs. He also pointed me to the Arduino forums, where there is a wealth of knowledge to help figure this interesting little board out.
The other project I’m working on is a simple one to understand and build. I bought an old stoplight at a surplus store, and am fixing it up for my rec room. It will be driving by relays that are controlled by an Arduino when I’m done with it. The programming is super simple, not much more complicated than the “blink” program that is the first thing you learn with the Arduino, it will just have three lights instead of one, and the “blinks” will be very slow, and never on at the same time. I may get fancy and figure out how to connect a motion sensor to it so it only runs while we are in the room (no point in powering lights when there’s no on there to see them).
I have been having a great time, and look forward to a lot of fun projects in the future. Not only that, but I’m getting things figured out now, so when my kids get a little older, I can help them learn to program and make neat little projects too!