added IRCheck method for IR sensor