IR beam break detection

Hmmmm. You are doing simultaneous transmit and receive, right?? Maybe the software/libraries interfere with each other???

IF you had another Arduino you could test separately...