IR light barrier ~ 2 in

Are you not aware that loop() loops? Why are you running an infinite loop in loop()?

Why are you calling Serial.begin() in loop()? Why are you calling it at all, when you never print() anything?

One typically does not use digitalRead() to read a 38KHz Receiver, unless the receiver is handling the de-modulation in hardware.