(IMP)RF signal control interupt(help fast plz)

Robin2:
Like all Arduino projects you need to go about this step by step.

First of all get the Arduino to transmit whenever a switch is pressed - that will be simpler than the IR decoder. That will allow you to develop the logic for controlling the transmission.

Then write a piece of code to blink an LED when the IR signal is detected. The blink will be equivalent to the switch press.

Then merge the two concepts.

I share @PaulS's suspicion that an interrupt is unnecessary. Interrupts can be very difficult to debug. Why not just check the status of the pin the LED input is connected to in every iteration of loop?

...R

Thks for ur reply following are simple codes which i am using

Interupt

long start = 0;

volatile long lastButtonPush = 0;

void setup()
{
  //start the serial
  Serial.begin(9600);
  
  //LED output
  pinMode(13,OUTPUT);
  //switch input
  pinMode(2,INPUT);
  
  //set the pull-up on the switch
  digitalWrite(2,HIGH);
  
  //seed the random number generator
  randomSeed(millis());
  
  //wait random time from 1 to 3 seconds
  delay(random(1000,3000));
  
  //turn the light on
  digitalWrite(13,HIGH);
  
  //attach the interrupt
  attachInterrupt(0,react,FALLING);  
  
  //get the start time
  start = millis();
}

void loop()
{
}

void react()
{
  long fin = millis();
  
  if(fin - lastButtonPush > 500)
  {  
    Serial.print("Your reaction time: ");
    Serial.println(fin - start);
  }
  
  lastButtonPush = fin;
}

RF transmitter

#include <VirtualWire.h>
#include <VirtualWire_Config.h>

void setup()
{Serial.begin(9600);

vw_setup(2000);
vw_set_tx_pin(8);
}
void loop()
{
  if(Serial.available())
  {
    char c = Serial.read();
    if(c == '1')
    {
      vw_send((uint8_t *)c,1);
    }
    else if (c == '0')
    {
      vw_send((uint8_t *)c,1);
    }
  }
  
}

RF reciever

#include <VirtualWire.h>
#include <VirtualWire_Config.h>

void setup()
{
  pinMode(13,OUTPUT);
  digitalWrite(13,LOW);
  
  vw_setup(2000);
  vw_set_rx_pin(7);
  vw_rx_start();
}

void loop()
{
  uint8_t buflen = VW_MAX_MESSAGE_LEN;
  uint8_t buf[buflen];
  
  if(vw_get_message(buf, &buflen))
  {
    for(int i=0;i<buflen;i++)
    {
      if(buf[i] == '1')
      {
        digitalWrite(13,HIGH);
      }
      else if(buf[i] == '0')
      {
        digitalWrite(13,LOW);
      }
    }
  }
}

i want to merge the interupt and rf transmitter code and in the above code i am able to control the led on the reciever by giving input on the serial monitor of the transmitter .
what i wish do is to be able to blink the led on the reiciever arduino once when interup is detected on the arduino with RF transmitter.