control the traffic lights with the remote control

64/5000
what is the solution for this system?

bitti_sonunda.ino (8.24 KB)

mhyldz79:
64/5000
what is the solution for this system?

Systems don't have solutions, systems are solutions.... I think you need to backup and describe your problem.

(And post the code, don't attach it.)

#include <IRremote.h>   //including the remote library

#define button_1  0xFF30CF // code received from first button
#define button_2  0xFF18E7 // code received from second button 
#define button_3  0xFF7A85 // code received from third button
int receiver_pin = 3;   //Connect the output pin of IR receiver here
//initializing the pins for leds
int first_led = 13;
int second_led = 12;
int third_led = 11;
int fourth_led = 10;
int fifth_led = 9;
int sixth_led = 7;
int seventh_led = 6;
int eighth_led = 5;
int ninth_led = 4;
int tenth_led = 2;
int led_state[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; //The initial state of the led's will be high
IRrecv receiver(receiver_pin); //Arduino will take output of IR receiver from pin 2
decode_results output;

void setup()
{
  Serial.begin(9600);
  receiver.enableIRIn();  // Start to take the output from IR receiver
  //initializing all the pins where we have connected the led's as output pins
  pinMode(first_led, OUTPUT);   //13
  pinMode(second_led, OUTPUT);  //12
  pinMode(third_led, OUTPUT);   //11
  pinMode(fourth_led, OUTPUT);  //10
  pinMode(fifth_led, OUTPUT);   //9
  pinMode(sixth_led, OUTPUT);   //7
  pinMode(seventh_led, OUTPUT); //6
  pinMode(eighth_led, OUTPUT);  //5
  pinMode(ninth_led, OUTPUT);   //4
  pinMode(tenth_led, OUTPUT);   //2
}

void loop() {
  if (receiver.decode(&output)) {
    unsigned int value = output.value;
    switch (value) {
      case button_1:

        if (led_state[1] == 1) {       // checking whether the previous state is on or not
          digitalWrite(first_led, LOW);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, HIGH);   //11
          digitalWrite(fourth_led, HIGH);  //10
          digitalWrite(fifth_led, LOW);   //9
          digitalWrite(sixth_led, LOW);   //7
          digitalWrite(seventh_led, HIGH); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, LOW);   //4
          digitalWrite(tenth_led, HIGH);   //2

          led_state[1] = 0;           // set the state as low
          digitalWrite(first_led, LOW);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, HIGH);   //11
          digitalWrite(fourth_led, HIGH);  //10
          digitalWrite(fifth_led, LOW);   //9
          digitalWrite(sixth_led, LOW);   //7
          digitalWrite(seventh_led, HIGH); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, LOW);   //4
          digitalWrite(tenth_led, HIGH);   //2
          led_state[1] = 1;          // set the state to high
          digitalWrite(first_led, LOW);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, HIGH);   //11
          digitalWrite(fourth_led, HIGH);  //10
          digitalWrite(fifth_led, LOW);   //9
          digitalWrite(sixth_led, LOW);   //7
          digitalWrite(seventh_led, HIGH); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, LOW);   //4
          digitalWrite(tenth_led, HIGH);   //2
        }
        break;
      case button_2:

        if (led_state[1] == 1) {       // checking whether the previous state is on or not
          digitalWrite(first_led, HIGH);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, LOW);   //11
          digitalWrite(fourth_led, LOW);  //10
          digitalWrite(fifth_led, HIGH);   //9
          digitalWrite(sixth_led, HIGH);   //7
          digitalWrite(seventh_led, LOW); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, HIGH);   //4
          digitalWrite(tenth_led, LOW);   //2

          led_state[1] = 0;           // set the state as low
          digitalWrite(first_led, HIGH);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, LOW);   //11
          digitalWrite(fourth_led, LOW);  //10
          digitalWrite(fifth_led, HIGH);   //9
          digitalWrite(sixth_led, HIGH);   //7
          digitalWrite(seventh_led, LOW); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, HIGH);   //4
          digitalWrite(tenth_led, LOW);   //2
          led_state[1] = 1;          // set the state to high
          digitalWrite(first_led, HIGH);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, LOW);   //11
          digitalWrite(fourth_led, LOW);  //10
          digitalWrite(fifth_led, HIGH);   //9
          digitalWrite(sixth_led, HIGH);   //7
          digitalWrite(seventh_led, LOW); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, HIGH);   //4
          digitalWrite(tenth_led, LOW);   //2
        }
        break;

      case button_3:

        if (led_state[1] == 1) {       // checking whether the previous state is on or not

          digitalWrite(fourth_led, LOW);       // yaya KIRMIZI sonuk
          digitalWrite(third_led, LOW);       // arac YESiL sonuk
          digitalWrite(second_led, HIGH);       // arac SARI sonuk
          digitalWrite(first_led, HIGH);      // arac KIRMIZI yanik
          digitalWrite(fifth_led, HIGH);       // yaya YESiL yanik
          digitalWrite(ninth_led, HIGH);
          digitalWrite(sixth_led, HIGH);
          delay(5000);                 // 5000 mS bekle
          digitalWrite(fifth_led, LOW);        // yaya YESiL sonuk
          digitalWrite(second_led, LOW);      // arac SARI yanik
          digitalWrite(eighth_led, LOW);
          digitalWrite(ninth_led, LOW);
          digitalWrite(fourth_led, HIGH);      // yaya KIRMIZI yanik
          delay(300);                 // 2500mS bekle
          digitalWrite(first_led, LOW);
          digitalWrite(sixth_led, LOW);
          digitalWrite(seventh_led, HIGH);
          digitalWrite(eighth_led, HIGH);
          digitalWrite(tenth_led, HIGH);
          digitalWrite(second_led, HIGH);       // arac SARI sonuk
          digitalWrite(third_led, HIGH);      // arac YESiL yanik
          delay(5000);                // 10000mS bekle
          digitalWrite(third_led, LOW);       // arac YESiL sonuk
          digitalWrite(second_led, LOW);      // arac SARI yanik
          digitalWrite(tenth_led, LOW);
          digitalWrite(sixth_led, HIGH);
          digitalWrite(eighth_led, LOW);
          delay(300);                 // 2500mS bekle
          digitalWrite(seventh_led, LOW);
          digitalWrite(eighth_led, HIGH);


          led_state[1] = 0;           // set the state as low

          digitalWrite(fourth_led, LOW);       // yaya KIRMIZI sonuk
          digitalWrite(third_led, LOW);       // arac YESiL sonuk
          digitalWrite(second_led, HIGH);       // arac SARI sonuk
          digitalWrite(first_led, HIGH);      // arac KIRMIZI yanik
          digitalWrite(fifth_led, HIGH);       // yaya YESiL yanik
          digitalWrite(ninth_led, HIGH);
          digitalWrite(sixth_led, HIGH);
          delay(5000);                 // 5000 mS bekle
          digitalWrite(fifth_led, LOW);        // yaya YESiL sonuk
          digitalWrite(second_led, LOW);      // arac SARI yanik
          digitalWrite(eighth_led, LOW);
          digitalWrite(ninth_led, LOW);
          digitalWrite(fourth_led, HIGH);      // yaya KIRMIZI yanik
          delay(300);                 // 2500mS bekle
          digitalWrite(first_led, LOW);
          digitalWrite(sixth_led, LOW);
          digitalWrite(seventh_led, HIGH);
          digitalWrite(eighth_led, HIGH);
          digitalWrite(tenth_led, HIGH);
          digitalWrite(second_led, HIGH);       // arac SARI sonuk
          digitalWrite(third_led, HIGH);      // arac YESiL yanik
          delay(5000);                // 10000mS bekle
          digitalWrite(third_led, LOW);       // arac YESiL sonuk
          digitalWrite(second_led, LOW);      // arac SARI yanik
          digitalWrite(tenth_led, LOW);
          digitalWrite(sixth_led, HIGH);
          digitalWrite(eighth_led, LOW);
          delay(300);                 // 2500mS bekle
          digitalWrite(seventh_led, LOW);
          digitalWrite(eighth_led, HIGH);
          
          

        }
        break;
    }
    Serial.println(value);
    receiver.resume();
  }
}

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

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

Ok but what's the question? What was the 64/5000 about?

(And now you can edit so that the sketch is enclosed in code tags, either with the </> icon or you can roll your own [code] sketch goes here [/code].)

Press button 3, the system hangs

#include <IRremote.h>   //including the remote library

#define button_1  0xFF30CF // code received from first button
#define button_2  0xFF18E7 // code received from second button 
#define button_3  0xFF7A85 // code received from third button
int receiver_pin = 3;   //Connect the output pin of IR receiver here
//initializing the pins for leds
int first_led = 13;
int second_led = 12;
int third_led = 11;
int fourth_led = 10;
int fifth_led = 9;
int sixth_led = 7;
int seventh_led = 6;
int eighth_led = 5;
int ninth_led = 4;
int tenth_led = 2;
int led_state[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; //The initial state of the led's will be high
IRrecv receiver(receiver_pin); //Arduino will take output of IR receiver from pin 2
decode_results output;

void setup()
{
  Serial.begin(9600);
  receiver.enableIRIn();  // Start to take the output from IR receiver
  //initializing all the pins where we have connected the led's as output pins
  pinMode(first_led, OUTPUT);   //13
  pinMode(second_led, OUTPUT);  //12
  pinMode(third_led, OUTPUT);   //11
  pinMode(fourth_led, OUTPUT);  //10
  pinMode(fifth_led, OUTPUT);   //9
  pinMode(sixth_led, OUTPUT);   //7
  pinMode(seventh_led, OUTPUT); //6
  pinMode(eighth_led, OUTPUT);  //5
  pinMode(ninth_led, OUTPUT);   //4
  pinMode(tenth_led, OUTPUT);   //2
}

void loop() {
  if (receiver.decode(&output)) {
    unsigned int value = output.value;
    switch (value) {
      case button_1:

        if (led_state[1] == 1) {       // checking whether the previous state is on or not
          digitalWrite(first_led, LOW);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, HIGH);   //11
          digitalWrite(fourth_led, HIGH);  //10
          digitalWrite(fifth_led, LOW);   //9
          digitalWrite(sixth_led, LOW);   //7
          digitalWrite(seventh_led, HIGH); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, LOW);   //4
          digitalWrite(tenth_led, HIGH);   //2

          led_state[1] = 0;           // set the state as low
          digitalWrite(first_led, LOW);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, HIGH);   //11
          digitalWrite(fourth_led, HIGH);  //10
          digitalWrite(fifth_led, LOW);   //9
          digitalWrite(sixth_led, LOW);   //7
          digitalWrite(seventh_led, HIGH); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, LOW);   //4
          digitalWrite(tenth_led, HIGH);   //2
          led_state[1] = 1;          // set the state to high
          digitalWrite(first_led, LOW);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, HIGH);   //11
          digitalWrite(fourth_led, HIGH);  //10
          digitalWrite(fifth_led, LOW);   //9
          digitalWrite(sixth_led, LOW);   //7
          digitalWrite(seventh_led, HIGH); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, LOW);   //4
          digitalWrite(tenth_led, HIGH);   //2
        }
        break;
      case button_2:

        if (led_state[1] == 1) {       // checking whether the previous state is on or not
          digitalWrite(first_led, HIGH);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, LOW);   //11
          digitalWrite(fourth_led, LOW);  //10
          digitalWrite(fifth_led, HIGH);   //9
          digitalWrite(sixth_led, HIGH);   //7
          digitalWrite(seventh_led, LOW); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, HIGH);   //4
          digitalWrite(tenth_led, LOW);   //2

          led_state[1] = 0;           // set the state as low
          digitalWrite(first_led, HIGH);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, LOW);   //11
          digitalWrite(fourth_led, LOW);  //10
          digitalWrite(fifth_led, HIGH);   //9
          digitalWrite(sixth_led, HIGH);   //7
          digitalWrite(seventh_led, LOW); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, HIGH);   //4
          digitalWrite(tenth_led, LOW);   //2
          led_state[1] = 1;          // set the state to high
          digitalWrite(first_led, HIGH);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, LOW);   //11
          digitalWrite(fourth_led, LOW);  //10
          digitalWrite(fifth_led, HIGH);   //9
          digitalWrite(sixth_led, HIGH);   //7
          digitalWrite(seventh_led, LOW); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, HIGH);   //4
          digitalWrite(tenth_led, LOW);   //2
        }
        break;

      case button_3:

        if (led_state[1] == 1) {       // checking whether the previous state is on or not

          digitalWrite(fourth_led, LOW);       // yaya KIRMIZI sonuk
          digitalWrite(third_led, LOW);       // arac YESiL sonuk
          digitalWrite(second_led, HIGH);       // arac SARI sonuk
          digitalWrite(first_led, HIGH);      // arac KIRMIZI yanik
          digitalWrite(fifth_led, HIGH);       // yaya YESiL yanik
          digitalWrite(ninth_led, HIGH);
          digitalWrite(sixth_led, HIGH);
          delay(5000);                 // 5000 mS bekle
          digitalWrite(fifth_led, LOW);        // yaya YESiL sonuk
          digitalWrite(second_led, LOW);      // arac SARI yanik
          digitalWrite(eighth_led, LOW);
          digitalWrite(ninth_led, LOW);
          digitalWrite(fourth_led, HIGH);      // yaya KIRMIZI yanik
          delay(300);                 // 2500mS bekle
          digitalWrite(first_led, LOW);
          digitalWrite(sixth_led, LOW);
          digitalWrite(seventh_led, HIGH);
          digitalWrite(eighth_led, HIGH);
          digitalWrite(tenth_led, HIGH);
          digitalWrite(second_led, HIGH);       // arac SARI sonuk
          digitalWrite(third_led, HIGH);      // arac YESiL yanik
          delay(5000);                // 10000mS bekle
          digitalWrite(third_led, LOW);       // arac YESiL sonuk
          digitalWrite(second_led, LOW);      // arac SARI yanik
          digitalWrite(tenth_led, LOW);
          digitalWrite(sixth_led, HIGH);
          digitalWrite(eighth_led, LOW);
          delay(300);                 // 2500mS bekle
          digitalWrite(seventh_led, LOW);
          digitalWrite(eighth_led, HIGH);


          led_state[1] = 0;           // set the state as low

          digitalWrite(fourth_led, LOW);       // yaya KIRMIZI sonuk
          digitalWrite(third_led, LOW);       // arac YESiL sonuk
          digitalWrite(second_led, HIGH);       // arac SARI sonuk
          digitalWrite(first_led, HIGH);      // arac KIRMIZI yanik
          digitalWrite(fifth_led, HIGH);       // yaya YESiL yanik
          digitalWrite(ninth_led, HIGH);
          digitalWrite(sixth_led, HIGH);
          delay(5000);                 // 5000 mS bekle
          digitalWrite(fifth_led, LOW);        // yaya YESiL sonuk
          digitalWrite(second_led, LOW);      // arac SARI yanik
          digitalWrite(eighth_led, LOW);
          digitalWrite(ninth_led, LOW);
          digitalWrite(fourth_led, HIGH);      // yaya KIRMIZI yanik
          delay(300);                 // 2500mS bekle
          digitalWrite(first_led, LOW);
          digitalWrite(sixth_led, LOW);
          digitalWrite(seventh_led, HIGH);
          digitalWrite(eighth_led, HIGH);
          digitalWrite(tenth_led, HIGH);
          digitalWrite(second_led, HIGH);       // arac SARI sonuk
          digitalWrite(third_led, HIGH);      // arac YESiL yanik
          delay(5000);                // 10000mS bekle
          digitalWrite(third_led, LOW);       // arac YESiL sonuk
          digitalWrite(second_led, LOW);      // arac SARI yanik
          digitalWrite(tenth_led, LOW);
          digitalWrite(sixth_led, HIGH);
          digitalWrite(eighth_led, LOW);
          delay(300);                 // 2500mS bekle
          digitalWrite(seventh_led, LOW);
          digitalWrite(eighth_led, HIGH);
          
          

        }
        break;
    }
    Serial.println(value);
    receiver.resume();
  }
}

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

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

#include <IRremote.h>   //including the remote library

#define button_1  0xFF30CF // code received from first button
#define button_2  0xFF18E7 // code received from second button 
#define button_3  0xFF7A85 // code received from third button

int receiver_pin = 3;   //Connect the output pin of IR receiver here
//initializing the pins for leds
int first_led = 13;
int second_led = 12;
int third_led = 11;
int fourth_led = 10;
int fifth_led = 9;
int sixth_led = 7;
int seventh_led = 6;
int eighth_led = 5;
int ninth_led = 4;
int tenth_led = 2;
int led_state[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; //The initial state of the led's will be high
IRrecv receiver(receiver_pin); //Arduino will take output of IR receiver from pin 2
decode_results output;

void setup()
{
  Serial.begin(9600);
  receiver.enableIRIn();  // Start to take the output from IR receiver
  //initializing all the pins where we have connected the led's as output pins
  pinMode(first_led, OUTPUT);   //13
  pinMode(second_led, OUTPUT);  //12
  pinMode(third_led, OUTPUT);   //11
  pinMode(fourth_led, OUTPUT);  //10
  pinMode(fifth_led, OUTPUT);   //9
  pinMode(sixth_led, OUTPUT);   //7
  pinMode(seventh_led, OUTPUT); //6
  pinMode(eighth_led, OUTPUT);  //5
  pinMode(ninth_led, OUTPUT);   //4
  pinMode(tenth_led, OUTPUT);   //2
}

void loop() {
  if (receiver.decode(&output)) {
    unsigned int value = output.value;
    switch (value) {
      case button_1:
        if (led_state[1] == 1) {       // checking whether the previous state is on or not
          digitalWrite(first_led, HIGH);       
          digitalWrite(second_led, HIGH);     
          digitalWrite(third_led, HIGH);       
          digitalWrite(fourth_led, HIGH);      
          digitalWrite(fifth_led, HIGH);        
          while (1) {
            digitalWrite(fourth_led, LOW);       
            digitalWrite(third_led, LOW);       
            digitalWrite(second_led, HIGH);       
            digitalWrite(first_led, HIGH);    
            digitalWrite(fifth_led, HIGH);    
            digitalWrite(ninth_led, HIGH);
            digitalWrite(sixth_led, HIGH);
            delay(5000);                
            digitalWrite(fifth_led, LOW);       
            digitalWrite(second_led, LOW);     
            digitalWrite(eighth_led, LOW);
            digitalWrite(ninth_led, LOW);
            digitalWrite(fourth_led, HIGH);     
            delay(300);                 
            digitalWrite(first_led, LOW);
            digitalWrite(sixth_led, LOW);
            digitalWrite(seventh_led, HIGH);
            digitalWrite(eighth_led, HIGH);
            digitalWrite(tenth_led, HIGH);
            digitalWrite(second_led, HIGH);     
            digitalWrite(third_led, HIGH);     
            delay(5000);               
            digitalWrite(third_led, LOW);       
            digitalWrite(second_led, LOW);      
            digitalWrite(tenth_led, LOW);
            digitalWrite(sixth_led, HIGH);
            digitalWrite(eighth_led, LOW);
            delay(300);                 
            digitalWrite(seventh_led, LOW);
            digitalWrite(eighth_led, HIGH);
          }
          break;
        }


      case button_2:

        if (led_state[1] == 1) {       // checking whether the previous state is on or not
          digitalWrite(first_led, LOW);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, HIGH);   //11
          digitalWrite(fourth_led, HIGH);  //10
          digitalWrite(fifth_led, LOW);   //9
          digitalWrite(sixth_led, LOW);   //7
          digitalWrite(seventh_led, HIGH); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, LOW);   //4
          digitalWrite(tenth_led, HIGH);   //2

          led_state[1] = 0;           // set the state as low
          digitalWrite(first_led, LOW);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, HIGH);   //11
          digitalWrite(fourth_led, HIGH);  //10
          digitalWrite(fifth_led, LOW);   //9
          digitalWrite(sixth_led, LOW);   //7
          digitalWrite(seventh_led, HIGH); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, LOW);   //4
          digitalWrite(tenth_led, HIGH);   //2
          led_state[1] = 1;          // set the state to high
          digitalWrite(first_led, LOW);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, HIGH);   //11
          digitalWrite(fourth_led, HIGH);  //10
          digitalWrite(fifth_led, LOW);   //9
          digitalWrite(sixth_led, LOW);   //7
          digitalWrite(seventh_led, HIGH); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, LOW);   //4
          digitalWrite(tenth_led, HIGH);   //2
        }
        break;
      case button_3:

        if (led_state[1] == 1) {       // checking whether the previous state is on or not
          digitalWrite(first_led, HIGH);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, LOW);   //11
          digitalWrite(fourth_led, LOW);  //10
          digitalWrite(fifth_led, HIGH);   //9
          digitalWrite(sixth_led, HIGH);   //7
          digitalWrite(seventh_led, LOW); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, HIGH);   //4
          digitalWrite(tenth_led, LOW);   //2

          led_state[1] = 0;           // set the state as low
          digitalWrite(first_led, HIGH);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, LOW);   //11
          digitalWrite(fourth_led, LOW);  //10
          digitalWrite(fifth_led, HIGH);   //9
          digitalWrite(sixth_led, HIGH);   //7
          digitalWrite(seventh_led, LOW); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, HIGH);   //4
          digitalWrite(tenth_led, LOW);   //2
          led_state[1] = 1;          // set the state to high
          digitalWrite(first_led, HIGH);   //13
          digitalWrite(second_led, HIGH);  //12
          digitalWrite(third_led, LOW);   //11
          digitalWrite(fourth_led, LOW);  //10
          digitalWrite(fifth_led, HIGH);   //9
          digitalWrite(sixth_led, HIGH);   //7
          digitalWrite(seventh_led, LOW); //6
          digitalWrite(eighth_led, HIGH);  //5
          digitalWrite(ninth_led, HIGH);   //4
          digitalWrite(tenth_led, LOW);   //2
        }
        break;
    }
    Serial.println(value);
    receiver.resume();
  }
}

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

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

No, you are not winning!

You need to go and read the forum instructions so that you can go back and modify each of your posts (not re-post them) - using the "More -> Modify" option below the right hand corner of your post - to mark up your code as such using the "</>" icon in the posting window. Just highlight each section of code (or output if you need to post that) from the IDE and click the icon. In fact, the IDE has a "copy for forum" link to put these markings on a highlighted block for you so you then just paste it here in a posting window.

It is inappropriate to attach it as a ".ino" file. People can usually see the mistakes directly and do not want to have to actually load it in their own IDE. And that would also assume they are using a PC and have the IDE running on that PC.

But don't forget to use the "Auto-Format" (Ctrl-T) option first to make it easy to read. If you do not post it as "code", it can be quite garbled and is always more difficult to read.

Also tidy up your blank space. Do use blank lines, but only between functional blocks.

Here's your while(1):

while (1) {
  digitalWrite(fourth_led, LOW);
  digitalWrite(third_led, LOW);
  digitalWrite(second_led, HIGH);
  digitalWrite(first_led, HIGH);
  digitalWrite(fifth_led, HIGH);
  digitalWrite(ninth_led, HIGH);
  digitalWrite(sixth_led, HIGH);
  delay(5000);
  digitalWrite(fifth_led, LOW);
  digitalWrite(second_led, LOW);
  digitalWrite(eighth_led, LOW);
  digitalWrite(ninth_led, LOW);
  digitalWrite(fourth_led, HIGH);
  delay(300);
  digitalWrite(first_led, LOW);
  digitalWrite(sixth_led, LOW);
  digitalWrite(seventh_led, HIGH);
  digitalWrite(eighth_led, HIGH);
  digitalWrite(tenth_led, HIGH);
  digitalWrite(second_led, HIGH);
  digitalWrite(third_led, HIGH);
  delay(5000);
  digitalWrite(third_led, LOW);
  digitalWrite(second_led, LOW);
  digitalWrite(tenth_led, LOW);
  digitalWrite(sixth_led, HIGH);
  digitalWrite(eighth_led, LOW);
  delay(300);
  digitalWrite(seventh_led, LOW);
  digitalWrite(eighth_led, HIGH);
}

The very nature of while(1) is that it will sit in there forever unless you do a break; to get out. There's nothing in there to a) read the remote and b) break out if were to read the right remote code.

@mhyldz79, please do not cross-post. Threads merged.

@mhyldz79, please use code tags.