cyborg5 / IRLib2

Library for receiving, decoding, and sending infrared signals using Arduino
GNU General Public License v3.0
384 stars 138 forks source link

Example for multiple raw arrays #121

Closed jabbson closed 1 year ago

jabbson commented 1 year ago

Hello!

I am trying to simulate one of my remotes and the output of the rawRecv for a single button is as follows:

#define RAW_DATA_LEN 12
uint16_t rawData[RAW_DATA_LEN]={
        394, 474, 
        394, 474, 
        394, 474, 
        394, 482, 
        390, 474, 
        394, 1000};
Do a cut-and-paste of the following lines into the 
designated location in rawSend.ino

#define RAW_DATA_LEN 42
uint16_t rawData[RAW_DATA_LEN]={
        382, 486, //0 >>2
        386, 482, //0
        386, 1354, //1
        382, 490, //0

        382, 486, //0 >>0
        382, 506, //0
        366, 502, //0
        366, 506, //0

        362, 506, //0 >>0
        362, 510, //0
        362, 506, //0
        358, 510, //0

        358, 1382, //1 >>C
        358, 1378, //1
        362, 506, //0
        362, 510, //0

        358, 1382, //1 >>C
        358, 1378, //1
        358, 514, //0
        354, 1382, //0

        358, 1000};

Is it still possible to use these two with rawSend, maybe one after another? Should there be a delay in between? Any advice is appreciated.

UPD: Initially I started by looking into the codes of the small remote control which came with the arduino kit, which produced only a single array, that I think I properly decoded into a set of 32 bits of LOW/HIGHs like this:

#define RAW_DATA_LEN 68
uint16_t rawData[RAW_DATA_LEN]={
    8962, 4554, 

    534, 594, //0    >>0
    538, 594, //0
    538, 594, //0
    534, 594, //0

    538, 594, //0    >>0 
    538, 594, //0
    538, 594, //0
    538, 594, //0

    534, 1706, //1    >>F
    534, 1702, //1
    538, 1726, //1
    510, 1706, //1

    534, 1706, //1    >>F
    534, 1702, //1
    534, 1706, //1
    534, 1706, //1

    534, 1702, //1    >>A
    534, 598, //0
    534, 1706, //1
    534, 594, //0

    538, 594, //0    >>2
    534, 594, //0
    538, 1702,// 1
    538, 594, //0

    534, 594, //0     >>5
    538, 1702, //1
    538, 598, //0
    534, 1702, //1

    534, 1702, //1    >>D
    538, 1702, //1
    538, 618, //0
    514, 1698, //1

    562, 1000};

FFA25D is what I expected to see for a remote like this(top left button).

On the other hand the DAIKIN AC ARC480A8 IR remote control's resulting array (initial array in this post) is odd. First of all I expect to see more data, based on what I read, Internet suggests, DAIKIN codes are 64 bits, which is not what I am seeing. I don't believe I am hitting the buffer limit and there should be more (for example based on this thread on arduino forum).

jabbson commented 1 year ago

I found my answer, for future generations, I ended up using this library to control the AC and this library to dump the long codes.