Help with Infrared Sensor

Think this is the right section to post this.

My robot was acting strangly so I've run a debug on the IR sensor and the value is really high, like it's constantly seeing something in front of it, nothing I do seems to influence the reading. I've taken it apart and re-wired but can't figure out whats going on. Can anyone advise?

a few questions…

Ive had a ton of issues with IR sensors…

1) What is the brand/ model number

 

2) Do the readings fluctuate when it moves around (Or does it seem stuck at those same high number?)

3) can you show us the debug code your running?

Do you know if the sensor is still in good working order?

You should be able to check it by using a digital camera. If you aim the sensor at a digital camera, you should see a blue/violet/grey light. If that is the case, you at least know the IR LED part of the sensor is still functioning.