Reset Value Received IR sensor

I really need to bring that once lost signal DigitalWrite (13, HIGH) for example.
I can not reset the value received from IR and basically when I click once the value remains the same
Is the code I tried to write:

#include <IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
{
  
  Serial.begin(9600);
  irrecv.enableIRIn();
  pinMode(13, OUTPUT);
}

void loop() {


  if ((irrecv.decode(&results)) == 0)
  {
    digitalWrite(13, HIGH);
   
  
  }
  
}

Actually it is the basis for the project I want to make, and without this code lost all my project.
Thanks :slight_smile:

You could read the millis timer when you turn the LED on, then some time later, turn it off.

AWOL:
You could read the millis timer when you turn the LED on, then some time later, turn it off.

Can you please write down the code?

I could write it down, but what would be the point?
Can you have a look at the blink without delay example?