GP2D12 - a complete test program using the Sharp GP2D12 on the BDMICRO MAVRIC and MAVRIC-II microcontroller boards. This program is intended to demonstrate how to use the BDMICRO MAVRIC or MAVRIC-II microcontroller boards in conjunction with a Sharp GP2D12 Infrared Ranger Module. Feel free to copy the relevent function definitions into your own applications and to customize them for your needs. The code is written in C using the GNU GCC C Compiler. A Makefile is provided which is known to work on the FreeBSD Unix operating system. Configuration: Simply attach your the GP2D12 signal line to A/D Converter channel 0 (PORTF0 pin), hook up power and ground. It's OK to use one of the supplied VCC pins on your microcontroller board to supply power to the GP2D12. If desired, attach a terminal to UART0 for 9600, 8N1; the GP2D12 will be sampled 10 times per second and printed to UART0. The raw A/D converted result is printed as well as the value converted to Volts. For more information about the MAVRIC and MAVRIC-II microcontroller boards, see: http://www.bdmicro.com/