Troubleshooting Arduino Nano IR LED

Hey guys, new to Arduinos and I just received my nano yesterday and been tinkering with it along with trying to set up an IR remote controlling individual LED's. I was wondering why this set up is not working. Any pointers on what I did wrong? Picture include, any help is greatly appreciated.

Imgur: The magic of the Internet First time ever soldering so please excuse the mess.

#include <IRremote.h>
  
  const int RECV_PIN = 2;
  IRrecv irrecv(RECV_PIN);
  decode_results results;
  const int redPin = 10;
  
  
  void setup(){
    irrecv.enableIRIn();
    irrecv.blink13(true);
    pinMode(redPin, OUTPUT);
  }
  
  void loop(){
      if (irrecv.decode(&results)){
  
          switch(results.value){
            case 0x726A350A: //Keypad button "1"
            digitalWrite(redPin, HIGH);
            delay(500);
            digitalWrite(redPin, LOW);
            }
  
          
          irrecv.resume(); 
      }
  }

Check the IR LED is working. Look at it with the electronic view finder of a camera and you will see it blink, or not.

Grumpy_Mike:
Check the IR LED is working. Look at it with the electronic view finder of a camera and you will see it blink, or not.

It seems to be working, I've tested it with the IR decoder while I point at the IR LED and codes are being put out on the serial monitor. I also tried multiple IR LEDS and it's still not working, do you think it could be the code or just faulty wiring?

I was wondering why this set up is not working. Any pointers on what I did wrong?

Well, you failed to describe what actually happens vs. what you expected to happen.

+1 karma for using code tags. Please attach images to your post on the forum, not on other image hosting sites, and when posting links, make them clickable, using the link icon, don't just cut & pasted addresses.

PaulRB:
Well, you failed to describe what actually happens vs. what you expected to happen.

+1 karma for using code tags. Please attach images to your post on the forum, not on other image hosting sites, and when posting links, make them clickable, using the link icon, don't just cut & pasted addresses.

Will remember to attach images to the post next time, but I was expecting the red LED to blink when I pressed the IR remote. What actually happened was nothing, it just didn't work and I swapped multiple LEDs with no different outcome. I also forgot to mention I am very very new to this so any pointers would be greatly appreciated.

So all that proves is that you are not getting back 0x726A350A from the decode. Find out what you are getting back by addling a:-

Serial.println(results.value, hex);

just before the case statement.
you also need to add a

Serial.begin(9600);

in the setup function.

Open the serial monitor to see the results printed out.

Grumpy_Mike:
So all that proves is that you are not getting back 0x726A350A from the decode. Find out what you are getting back by addling a:-

Serial.println(results.value, hex);

just before the case statement.
you also need to add a

Serial.begin(9600);

in the setup function.

Open the serial monitor to see the results printed out.

That is odd because the hex code I am getting back for the button no.1 is 726A350A. This is the code in the IRrec Demo decoder.

#include <IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
 Serial.begin(9600);
 // In case the interrupt driver crashes on setup, give a clue
 // to the user what's going on.
 Serial.println("Enabling IRin");
 irrecv.enableIRIn(); // Start the receiver
 Serial.println("Enabled IRin");
}

void loop() {
 if (irrecv.decode(&results)) {
   Serial.println(results.value, HEX);
   irrecv.resume(); // Receive the next value
 }
 delay(100);
}

Grumpy_Mike:
So all that proves is that you are not getting back 0x726A350A from the decode. Find out what you are getting back by addling a:-

Serial.println(results.value, hex);

just before the case statement.
you also need to add a

Serial.begin(9600);

in the setup function.

Open the serial monitor to see the results printed out.

Got it working, just a stupid mistake of plugging the resistor in the wrong slot.