It depends on the output of the hall effect sensor, they tend to have a proportional voltage output based on the sensors distance from the magnet, if this is the case with your sensor then you should use an ADC input on your uC to measure the voltage.