Making a true statement false/Need direction

I want to keep my code simple. I added a little to Sheriffs to get where I am so far. I have a remote turning on an led. How do I get the led to turn back off? And then make a program that will turn on and off whenever I place the command.

Code:

/*

  • IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
  • An IR detector/demodulator must be connected to the input RECV_PIN.
  • Version 0.1 July, 2009
  • Copyright 2009 Ken Shirriff
  • http://arcfn.com
    */

#include <IRremote.h>

int RECV_PIN = 11;

int ledPin=12;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
pinMode(ledPin, OUTPUT);
}

void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
if (results.value==0xABE4207)
{
Serial.println("button 1");
digitalWrite(ledPin, HIGH);
}

}
}

You are looking to illuminate the led for a short time, to aknowledge the signal receipt.

Add a short delay after you set it high an the. Set it low

digitalWrite(ledPin, HIGH);
delay(70);
digitalWrite(ledPin, LOW);

Thanks for the reply but that is not my intention. I want the led to stay lit "forever" until i feed another specific ir pulse to it to tell it to shut off.

Please edit your post, select the code, and put it between [code] ... [/code] tags.

You can do that by hitting the # button above the posting area.

350boatracing:
Thanks for the reply but that is not my intention. I want the led to stay lit "forever" until i feed another specific ir pulse to it to tell it to shut off.

so like this:

#include <IRremote.h>

int RECV_PIN = 11;
int ledPin=12;
IRrecv irrecv(RECV_PIN);
decode_results results;
//
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
  pinMode(ledPin, OUTPUT);
}
//
void loop() 
{
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    if (results.value==0xABE4207)
    {
      Serial.println("button 1");
      digitalWrite(ledPin, HIGH);
    }
    else if(results.value==SOME_OTHER_VALUE)//<<<<<<<<<<<<<<<
    {
      Serial.println("Some other thing...");
      digitalWrite(ledPin, LOW);
    }
  }
}