IR Codes Doesn't Control AC

An area for more general discussion by the user community for topics not covered elsewhere
Lucifer22334
Posts: 10
Joined: Mon May 20, 2019 10:36 am

Re: IR Codes Doesn't Control AC

Post 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: 
 }
User avatar
AnalysIR
Site Admin
Posts: 794
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: IR Codes Doesn't Control AC

Post 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.
Lucifer22334
Posts: 10
Joined: Mon May 20, 2019 10:36 am

Re: IR Codes Doesn't Control AC

Post 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?
User avatar
AnalysIR
Site Admin
Posts: 794
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: IR Codes Doesn't Control AC

Post 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.
Lucifer22334
Posts: 10
Joined: Mon May 20, 2019 10:36 am

Re: IR Codes Doesn't Control AC

Post 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.
User avatar
AnalysIR
Site Admin
Posts: 794
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: IR Codes Doesn't Control AC

Post by AnalysIR »

the link is in your post (where I removed the receiver code)
Lucifer22334
Posts: 10
Joined: Mon May 20, 2019 10:36 am

Re: IR Codes Doesn't Control AC

Post by Lucifer22334 »

Hi Sir,

Any NPN transistor will be fine with this IR circuit right?
Lucifer22334
Posts: 10
Joined: Mon May 20, 2019 10:36 am

Re: IR Codes Doesn't Control AC

Post by Lucifer22334 »

Sorry for the late reply Sir. I will try it and post here if there's any problem.
Post Reply