Turn Your Mac into a Thermometer with Arduino


Arduino kit connected
The topic of the Arduino came up around A&L’s “virtual water cooler” last week. About a year and a half ago, I purchased a SparkFun Inventor’s Kit for Arduino. The kit is a fun way for a hardware novice like me to get started and learn some basics. It comes with more than a dozen sample projects such as lighting LEDs, spinning a motor and generating audio.
Inspired by the discussion at A&L, I pulled my kit out this past weekend and put together the sample circuit that reads temperature. In addition to learning hardware, another ulterior motive in my Arduino purchase was to get my son interested in electronics. He’s still a little young to really understand everything and instead likes to pretend the breadboard is a train. It makes it a little hard to put the circuit together as the “circuit train” travels around the tracks. But he does enjoy seeing the end result and playing with the circuits we make.
arduino_thermometer1.pngBecause the sample temperature project just prints numbers to a console window, I thought I’d spruce it up for my son a little bit and write a UI that simulated a thermometer. I found some Java code on an Arduino Playground page that reads the temperature measurements written to the serial port by the Arduino board. Getting everything in place was just a matter of wiring up the SparkFun schematic, integrating the Java code and writing a little thermometer widget. All of the resources needed for this project can be found here.
I finished everything up late last evening so my son has yet to see the end result. Something tells me he would be more impressed if I animated steam coming out of a train engine to represent the temperature.
There was a recent TED talk by one of the creators of Arduino. It’s fascinating to see the types of projects people are completing with the Arduino. I think we’re in for a fascinating future.

+ more

Accurate Timing

Accurate Timing

In many tasks we need to do something at given intervals of time. The most obvious ways may not give you the best results. Time? Meh. The most basic tasks that don't have what you might call CPU-scale time requirements can be handled with the usual language and...

read more