Keep reading of 0 in the serial montior while using delay (IR LED)

Hi, guys!

I new to Arduino. I would like to read an IR LED with LED Reciever.
I can read values which come from the Transmitter (IR LED) while it is on.

When I use the delay, I can't read any value of the Reciever in the serial port.

I use the PULL-DOWN connection for my Reciever. ( 5V---longer leg, GND---10k--- analogPin)

My Code:

int led=8;
int sensor=A0;
int sensorValue=0;
// the setup function runs once when you press reset or power the board
void setup() {
Serial.begin(9600);
pinMode(led, OUTPUT);
pinMode(sensor,INPUT);
}

void loop() {
sensorValue=analogRead(sensor);
// Serial.println(sensorValue);

digitalWrite(led, HIGH);
Serial.println(sensorValue);
delay(1000);
digitalWrite(led, LOW);
Serial.println(sensorValue);
delay(1000);

}

Is the IR source active for at least two seconds?

Double post in same sub-forum. 7 year old neco to boot.

https://forum.arduino.cc/index.php?topic=148466.0

OP: Reading an I/R diode does not involve an analogRead(). It’s a digital signal.