IR sensor

I currently using a 2Y0A02 sharp sensor.
In previous testing, the sensor is working properly and infrared light can be seen from the sensor.
However, currently the sensor does not seems to be working and no infrared light can be seen from the sensor.

Is there any way to check whether the sensor is working or not ? :-/

I would connect the sensor output to an Arduino analog pin and write a test loop that tells you on your computer screen what voltage the Arduino is reading.

what is the code to output voltage reading from the sensor?

Trick to check if your IR SENDER is emitting something for the sensor to sense...

Look at it with a webcam or cheapie "CCTV" camera.... many "see" IR.

Maybe just buy a new IR sensor? Not expensive....