hi, i'm trying to control my daikin ac (the remotes code is ARC470A1) with arduino. I managed to find the raw IR codes but this time the remote sends two infrared signals one after another. So i tried to replicate that.
Here is my code:
/* rawSend.ino Example sketch for IRLib2
* Illustrates how to send a code Using raw timings which were captured
* from the "rawRecv.ino" sample sketch. Load that sketch and
* capture the values. They will print in the serial monitor. Then you
* cut and paste that output into the appropriate section below.
*/
#include <IRLibSendBase.h> //We need the base code
#include <IRLib_HashRaw.h> //Only use raw sender
IRsendRaw mySender;
void setup() {
Serial.begin(9600);
delay(2000); while (!Serial); //delay for Leonardo
Serial.println(F("Every time you press a key is a serial monitor we will send."));
}
#define RAW_DATA_LEN 12
uint16_t rawData[RAW_DATA_LEN]={
450, 450, 426, 446, 422, 374, 498, 318,
554, 442, 426, 1000};
#define RAW_DATA_LENA 100
uint16_t rawDataA[RAW_DATA_LENA]={
378, 1366, 410, 1326, 410, 1326, 410, 1330,
410, 466, 378, 486, 378, 1362, 410, 462,
374, 490, 378, 494, 378, 494, 374, 494,
378, 490, 378, 494, 378, 494, 374, 494,
378, 490, 382, 490, 382, 1358, 414, 454,
414, 458, 414, 454, 414, 454, 418, 1326,
414, 454, 414, 458, 410, 458, 410, 458,
410, 462, 410, 458, 410, 458, 410, 462,
406, 466, 382, 486, 406, 462, 394, 478,
378, 490, 402, 470, 406, 462, 402, 466,
382, 490, 378, 494, 378, 490, 378, 1362,
378, 490, 378, 1366, 378, 490, 378, 1358,
378, 494, 378, 1000};
void loop() {
if (Serial.read() != -1) {
mySender.send(rawData,RAW_DATA_LEN,38);
delay(7);
mySender.send(rawDataA,RAW_DATA_LENA,38);
Serial.println(F("Sent signal."));
}
}
But this didn't work so for debuging it i took another arduino and receive the codes. Other arduino only received the first signal but not the second.