I purchased https://www.jaycar.co.nz/medias/sys_master/images/images/9677365510174/XC4426-dataSheetMain.pdf, which seems identical to https://arduinomodules.info/ky-005-infrared-transmitter-sensor-module/.
I connected the module according to the diagram:

I then copied the following Sketch:
#include <IRremote.h>
IRsend irsend;
void setup()
{
Serial.begin(9600); // Initialize serial interface
}
void loop()
{
for (int i = 0; i < 10; i++) {
irsend.sendSony(0xa90, 12); // code for Sony TV power command
delay(5000); // wait 5 seconds
}
}
When I compiled the above, I got the following warning:
warning: 'void IRsend::sendSony(long unsigned int, int)' is deprecated: This old function sends MSB first! Please use sendSony(aAddress, aCommand, aNumberOfRepeats).
So, I modified the code and added a 3 for the aNumberOfRepeats parameter. Thus, my final Sketch was this:
#include <IRremote.h>
IRsend irsend;
void setup()
{
Serial.begin(9600); // Initialize serial interface
}
void loop()
{
for (int i = 0; i < 10; i++) {
irsend.sendSony(0xa90, 12, 3); // code for Sony TV power command
delay(5000); // wait 5 seconds
}
}
When I ran the Sketch on my Uno and viewed the module through my camera phone, I did not see the module blinking. My assumption is that this is not working for some reason. Any ideas why?
Also, I'm measuring about 4.5 volts between GND and the middle pin. That seems right. When I measure GND and the signal out pin, I get a steady 0.64 volts. Shouldn't that be toggling between 0 and some number?
UPDATE per @orithena's comment:
I've updated the code as per suggested, but the transmitter still doesn't blink when viewed through my camera phone:
#include <IRremote.h>
IRsend irsend;
#define IR_SEND_PIN 5
void setup()
{
pinMode(IR_SEND_PIN , OUTPUT);
Serial.begin(9600);
}
void loop()
{
for (int i = 0; i < 10; i++) {
irsend.sendSony(0xa90, 12, 255);
delay(1000);
}
}
Just a few notes about this new code:
- I tested connecting
Sto pins 3 and 5; neither worked 255is the highest number I could set foraNumberOfRepeats, otherwise I would get a compile warning: "warning: large integer implicitly truncated to unsigned type"
UPDATE per @jsotola's comment:


