Over Christmas break I stumbled upon some classes listed on the Sparkfun website. Two of them happened to be scheduled over a three day weekend early in January. At approximately 16 hours, the drive from Edwardsville, IL to Boulder, CO couldn’t be much longer and still be truthfully be described as a “day trip.” But when else would I have a chance to learn about microcontrollers and programming in a classroom environment? I decided to make the journey and give the classes a try.
One of the first NerdKits projects involves programming a temperature sensor, not unlike the one that comes built in to the Sprite. The temperature sensor in the NerdKit looks very much like a transistor, but in this case the left pin connects to the voltage and the right pin connects to ground. The middle pin outputs analogue measurements corresponding to the amount of heat in its environment. In order to use this data, the microcontroller unit must first convert it into digital information.
The analogue-to-digital conversion executes according to the C program that I write, with help from the NerdKits libraries. At the highest level, the MCU executes the following
main function: Continue reading