Arduino switch case problem

I have made a code for Ir remote control for appliances but I am not getting output.
Please check it up if it need any correction

/*
* 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 = 6;
int led = 13;//1FE50AF
int led1 = 12;//1FED827 
//int led2 = 11; //1FEF807
////int led3 = 10;//1FE3087
//int led4 = 9;//1FEB04F

boolean previousState=LOW;
boolean previousState1=LOW;
//boolean previousState2=LOW;
//boolean previousState3=LOW;
//boolean previousState4=LOW;
boolean state;
boolean state1;
//boolean state2;
//boolean state3;
//boolean state4;
IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
 Serial.begin(9600);
 pinMode(13,OUTPUT);
 pinMode(12,OUTPUT);
 //pinMode(10,OUTPUT);
 //pinMode(9,OUTPUT);
// pinMode(8,OUTPUT);
 irrecv.enableIRIn();// Start the receiver 
}

void loop() {
 if (irrecv.decode(&results)) 
 {
   Serial.println(results.value, HEX);
   switch(results.value)
   {
      case '0x1FE50AF':
      Serial.println("LED ON");
      if (previousState == LOW)
      {state=HIGH;
       digitalWrite(led,state);
       Serial.println("LED ON");
      previousState=state;}
      else
      {state=LOW;
      digitalWrite(led,state);
      Serial.println("LED Off");
      previousState=state;}
      break;
       case '0x1FED827':
       Serial.println("LED ON");
      if (previousState1 == LOW)
      {state=HIGH;
       digitalWrite(led1,state1);
       Serial.println("LED ON");
      previousState1=state1;}
      else
      {state1=LOW;
      digitalWrite(led1,state1);
      Serial.println("LED off");
      previousState1=state1;}
      break;
       /*case '0x1FEF807':
      if (previousState2 == LOW)
      {state2=HIGH;
      digitalWrite(led2,state2);
      previousState2=state2;}
      else
      {state2=LOW;
      digitalWrite(led2,state2);
      previousState2=state2;}
      break;
       case '0x1FE3087':
      if (previousState3 == LOW)
      {state3=HIGH;
       digitalWrite(led3,state3);
      previousState3=state3;}
      else
      {state3=LOW;
      digitalWrite(led3,state3);
      previousState3=state3;}
      break;
       case '0x1FEB04F':
      if (previousState4 == LOW)
      {state4=HIGH;
       digitalWrite(led4,state4);
      previousState4=state4;}
      else
      {state4=LOW;
      digitalWrite(led4,state4);
      previousState4=state4;}
      break;*/
   }   
   irrecv.resume(); // Receive the next value
 }
}

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

Hi,
Welcome to the forum.

Have you tried the IRemote example codes first to make sure you are reading the IR remote.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :slight_smile:

'0x1FE50AF'

Single quotes for a single character. Does the number really need quotes? What is the data type of results.value?

Hint: in IRremote.h

 unsigned long value; // Decoded value