unable to read ir sensor value

Hmmm...not sure

  • Have you tried using different LEDs and phototransistors? It could be a flawed component.

  • You are aware that the range will only be a few millimeters?

  • Have you mounted the components close together so that the light from the LED will be reflected into the phototransistor (when you place a white surface a few millimeters from it)?

  • There is no "IR Transistor"!! There is an IR LED and a PHOTOtransistor. The latter should pick up the light from the 1st.

  • Are you sure your cicuit is set up right.

  • Are you sure you're reading from the right analog in?

  • What is the reading when you DON'T cover it with your hand? Remember that it gives a LOW reading when light IS reflected and a HIGH reading when it isn't. Not the other way around as you may think..