Just to be sure, try setting all of your unused analog inputs high with the digitalWrite command.
Another idea is to verify that your Sharp IR is at least putting out IR. If you have a digital camera, Look at your sensor through the camera with the lights off. You should be able to see some light from the IR emitter. That doesn’t validate that the unit is completely working, but it at least shows that the emitter portion is still putting out IR.
If you have an osciloscope you can verify the output, but I suspect you do not have one. (I wish I did.)
How about measuring the voltage from the sensors output pin using a multi meter. Isolate every other variable. Tape down the sensor on a box. Put it on the table. Put a stable, flat, opaque object in front of. Now measure the voltage coming out while varying the distance between the two.
That’s what a scientist would do. That’s how I learned how to use a Sharp.
This experiment has a twin: remove the sensor an study the micro controller. I recommend a potmeter.