#include <IRremote.h>
IRrecv remote(0);
decode_resulta code;
#define LED 6

void setup()
{
  Serial.begin(9600);
  remote.enableIRIn();
  pinMode(LED, OUTPUT);
}

void loop()
{
  if (remote.decode(code))
  {
    Serial.println(code.value);
    if (code.value == 16724175)   // code for 1
     digitalWrite(LED, 1);
    if (code.value == 16738455)   // code for 0
     digitalWrite(LED, 0);
   remote.resume();
  }
}