Finished pan-n-tilt code.