unable to read ir sensor value

Could it be that you've placed the IR LED in the place of the IR Transistor? In a lot of cases they do look similar.