IR emitter and receiver problem

Are you sure that schematic is correct ? You have a digital output and an analog input connected to the same device. Which one is the emitter ? (clear one or dark one ?)