First of all, u need to know what is a RC servo motor and how to control it. You may find info by googling around and Cytron also provide a very simple sample source code in C36R servo page
here.
The sensor u want to use will give you digital output, so just configure a pin to input and detect the high/low.