Analog or digital IR for proximity sensor?

The modulated digital is the watch to go but don't use that sensor as it is not suited to a continuous pulsed signal. Go for one that is designed for a "light barrier"