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