Page 2 of 2

Re: IR Codes Doesn't Control AC

Posted: Thu May 23, 2019 2:33 pm
by Lucifer22334
Here's the receiver's code:

https://www.analysir.com/blog/2014/03/1 ... s-arduino/

Here's the sender's Code:

Code: Select all

/*
 * 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() {
 // 0 : PANASONIC128_216_280AC :  : 40040720000000604004072000140401F50000700700009100002F : 216 : 0
//Note: Be sure to use the correct Carrier frequency, for each individual signal, as(or if) indicated above
//

// NB: Not all protocols are supported by IRremote or IRLib. You may need to edit the code below manually
// Automatically Generated by AnalysIR for xxxxxxxx, visit https://www.AnalysIR.com/ or email info@....... for further details
int khz=38; //NB Change this default value as neccessary to the correct carrier frequency


uint16_t Signal_0_0[] = {3500,1750,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,435,435,435,435,435,435,435,435,435,435,9896,3500,1750,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,1300,435,1300,435,435,435,1300,435,435,435,1300,216,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,1300,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,435,435,1300,435,435,435,435,435,435,435,1300,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,1300,435,435,435,1300,435,1300,435,1300,435,1300,435}; //AnalysIR Batch Export (IRremote) - RAW

irsend.sendRaw(Signal_0_0, sizeof(Signal_0_0)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
 // AnalysIR IR Protocol: PANASONIC128_216_280AC, Key: 
 }

Re: IR Codes Doesn't Control AC

Posted: Thu May 23, 2019 2:46 pm
by AnalysIR
You need to put a delay in your Tx code at the end of the 'loop'...otherwise you will overlaod/confuse the IR reveiver in the target device. delay(5000);

I will edit out the receive code you posted, as we prefer to keep one location/source for that.

Re: IR Codes Doesn't Control AC

Posted: Fri May 24, 2019 5:01 am
by Lucifer22334
AnalysIR wrote: Thu May 23, 2019 2:46 pm You need to put a delay in your Tx code at the end of the 'loop'...otherwise you will overlaod/confuse the IR reveiver in the target device. delay(5000);

I will edit out the receive code you posted, as we prefer to keep one location/source for that.
Ok, Sir, I will add 5-sec delay in transmitters code. So will this code will able to work, Sir? Please, can you share with me the receiver's code after editing?

Re: IR Codes Doesn't Control AC

Posted: Fri May 24, 2019 1:00 pm
by AnalysIR
Ok, Sir, I will add 5-sec delay in transmitters code. So will this code will able to work, Sir?
The 5 second delay is to avoid overloading the target device. Under normal circumstances, you would just send a sign when a button is pressed or some other event.
With the information available, I do not see a reason why it would not work.
Please, can you share with me the receiver's code after editing?
I didn't change the receiver code. I replaced it with a link to the original version.

Re: IR Codes Doesn't Control AC

Posted: Fri May 24, 2019 1:20 pm
by Lucifer22334
Ok so, Please share Link with me, Sir. And if this doesn't work then I think there is a problem with the AC.

Re: IR Codes Doesn't Control AC

Posted: Fri May 24, 2019 3:28 pm
by AnalysIR
the link is in your post (where I removed the receiver code)

Re: IR Codes Doesn't Control AC

Posted: Mon May 27, 2019 5:02 am
by Lucifer22334
Hi Sir,

Any NPN transistor will be fine with this IR circuit right?

Re: IR Codes Doesn't Control AC

Posted: Mon May 27, 2019 9:52 am
by AnalysIR
Yes, most NPN transistors should be OK.

Re: IR Codes Doesn't Control AC

Posted: Tue May 28, 2019 5:17 am
by Lucifer22334
Sorry for the late reply Sir. I will try it and post here if there's any problem.