I was able to fix the problem. Thanks for all the help.
The problem was with the code and after some searching the code below is what got me the results I was looking for.( The IR led transmits the code)
/*
* SimpleSender.cpp
*
* Demonstrates sending IR codes in standard format with address and command
* An extended example for sending can be found as SendDemo.
*
* Copyright (C) 2020-2021 Armin Joachimsmeyer
* armin.joachimsmeyer@gmail.com
*
* This file is part of Arduino-IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.
*
* MIT License
*/
#include <Arduino.h>
/*
* Define macros for input and output pin etc.
*/
#include "PinDefinitionsAndMore.h"
//#define SEND_PWM_BY_TIMER
//#define USE_NO_SEND_PWM
#include <IRremote.h>
IRsend irsend;
int i = 0;
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRREMOTE));
/*
* The IR library setup. That's all!
*/
IrSender.begin(IR_SEND_PIN, ENABLE_LED_FEEDBACK); // Specify send pin and enable feedback LED at default feedback LED pin
Serial.print(F("Ready to send IR signals at pin "));
Serial.println(IR_SEND_PIN);
}
void loop() {
if (i == 0){
irsend.sendNEC(0xFF02FD, 32); // this turns on the led strip
i++;
}
else{
irsend.sendNEC(0xFF1AE5, 32); // this selects the colour red
}
}