connect IR Sensor

You haven't told us what type of IR sensor you have or how you have connected it or what code you're trying to use to get information from it.

Without any of that I can't even manage a wild guess, certainly not a real answer.

Steve