Unable to send RAW IR code to an AC

I tried to send a code to my AC but have no output to my LED. I'm using an Arduino Uno, the IRremote.h library was modified with #define RAWBUF 800
The hardware is well connected, with IR LED on pin 3 and with a 220 ohm resistor on GND, tested with a modified Blink sketch.
Using last IRremote library 3.3.0 and tested the code from this link (IR Remote control of Air Conditioner - Can't get it to work), still have no output to IR LED and also noticed the TX LED from Uno always stays ON.

Please help, I don't know what I'm doing wrong. Thank you!


/*
 * IRremote: IRsendRawDemo - demonstrates sending IR codes with sendRaw
 * An IR LED must be connected to Arduino PWM pin 3.
 * Version 0.1 July, 2009
 * Copyright 2009 Ken Shirriff
 * http://arcfn.com
 *
 * IRsendRawDemo - added by AnalysIR (via www.AnalysIR.com), 24 August 2015 
 */


#include <IRremote.h>

IRsend irsend;

void setup()
{

}

void loop() {
  int khz = 38; // 38kHz carrier frequency for the NEC protocol
  unsigned int irSignal[] = {3552, 1664, 508, 364, 508, 1232, 504, 364, 508, 360, 508, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 504, 1236, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 504, 364, 508, 364, 504, 1232, 508, 1232, 480, 1256, 484, 392, 480, 388, 480, 1256, 484, 388, 480, 388, 480, 392, 504, 364, 480, 388, 508, 360, 508, 364, 480, 388, 504, 364, 508, 364, 504, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 504, 368, 504, 364, 504, 364, 504, 364, 508, 364, 504, 364, 508, 360, 508, 364, 504, 364, 504, 364, 508, 364, 504, 368, 476, 392, 476, 392, 480, 1256, 484, 1256, 508, 364, 504, 364, 504, 364, 508, 360, 508, 364, 504, 10884, 3528, 1688, 504, 368, 504, 1232, 484, 384, 484, 388, 484, 384, 484, 384, 484, 384, 484, 392, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 508, 1228, 508, 364, 504, 364, 508, 364, 504, 364, 504, 368, 504, 364, 504, 364, 504, 1232, 508, 1232, 508, 1232, 504, 364, 508, 364, 504, 1232, 504, 364, 508, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 1236, 504, 1232, 480, 1260, 484, 384, 484, 384, 484, 384, 484, 388, 484, 384, 508, 368, 476, 1256, 508, 1228, 512, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 1236, 504, 1232, 504, 364, 508, 364, 504, 364, 504, 1236, 504, 1232, 480, 388, 480, 392, 484, 384, 480, 388, 484, 388, 484, 384, 484, 384, 484, 392, 480, 388, 480, 388, 480, 388, 508, 364, 504, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 508, 364, 504, 1232, 504, 1236, 504, 1232, 504, 364, 508, 364, 504, 364, 480, 388, 480, 392, 476, 392, 480, 392, 480, 388, 480, 392, 480, 1252, 512, 1232, 504, 1232, 508, 364, 504, 364, 504, 364, 504, 368, 504, 364, 504, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 508, 368, 472, 396, 476, 392, 476, 392, 476, 396, 476, 1256, 484, 392, 476, 392, 480, 388, 480, 388, 508, 364, 504, 364, 504, 1236, 504, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 504, 364, 508, 364, 504, 364, 504, 364, 508, 364, 504, 368, 500, 368, 500, 368, 476, 396, 476, 392, 476, 392, 476, 1260, 484, 1252, 484, 1260, 480, 388, 504, 364, 508, 364, 504, 1232, 508};
  
  irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz); //Note the approach used to automatically calculate the size of the array.

  delay(5000); //In this example, the signal will be repeated every 5 seconds, approximately.
}

Hello, do yourself a favour and please read How to get the best out of this forum and modify your post accordingly (including code tags and necessary documentation of your ask).

1 Like

thx for the edit.

the library has evolved. Now there is an IrSender object.

check: Arduino-IRremote/examples/SendRawDemo at master · Arduino-IRremote/Arduino-IRremote · GitHub

Notice the begin() call in the setup()

    IrSender.begin(IR_SEND_PIN, ENABLE_LED_FEEDBACK); // Specify send pin and enable feedback LED at default feedback LED pin

Thank you for the answer. It helped me to solve the problem by installing an older library 3.0.0. It was easier for me.
Have a nice day!

That's a solution indeed (not future proof but if it works)