how to program h046W IR sensor

Hello,

I recently got an H046W IR-sensor. I want to sense a water meter sweep hand so I can
detect if I have a leak.. I wired it up this way..I got the diagram and product from adafruit.
The diagram shows QRB1114 but I think it is the same as what I have.
Next I see the detector/sensor is wired into a digital pin ~9 .. I would have thought it would go to
an analog pin?

what I am looking for is a sketch or a link that does what the picture on their site shows... blinks a led when the paper is passed over the sensor ...

any help in this matter would be greatly appreciated..

thanks again --
-don