C code for an AVR MCU that controls a servo using feedback from an IR distance sensor