This is the fix.
It turns out that when you do the following, to include the entire IRLib2 library, it really doesn't include the entire library. At least it doesn't include the stuff to allow for sending Raw data.
#include <IRLibAll.h>
(This doesn't work either)
#include <IRLib2.h>
If you are not sending Raw codes, but are sending several different IR protocols, then that would be perfect to use.
BUT since I am sending BOTH Raw codes and known IR protocols, then I have to include the library like this. (I got the codes individually from the get IR codes example and then saved them to the program I created, which is only sending IR codes.)
#include <IRLibSendBase.h> // We need the base code
#include <IRLib_P01_NEC.h> // Add the known IR protocols that you're using
#include <IRLib_P07_NECx.h>
#include <IRLib_HashRaw.h> // this one MUST be the last protocol listed
#include <IRLibCombo.h> // Then we need the combiner
IRsend mySender;
IRsendRaw mySenderRaw;
// I got this from the receive IR signals example
uint16_t myRawIRCodesData[36] =
{2782, 6090, 2890, 2082, 818, 2070, 786, 2138,
706, 2162, 734, 2166, 1758, 2162, 734, 2166,
734, 2190, 750, 2122, 1802, 2122, 806, 2090,
846, 2054, 846, 2090, 762, 2138, 706, 2190,
706, 2194, 706, 1000};
uint32_t myCodeVar[] = {0x1FE58A7, // Sound Bar Power On
0xE144827D // DVD Power On
};
setup()
{}
loop()
{
//Pass the buffer,length, optionally frequency
mySenderRaw.send(myRawIRCodesData,36,36);
delay(5000);
mySender.send(NEC, myCodeVar[0], 32)
delay(5000);
mySender.send(NEC, myCodeVar[1], 32)
delay(5000);
}
You must add all the known protocols that you are wanting to use. It says you don't have to put them in any order. BUT the IRLibSendBase.h MUST be first, then all the known protocols you want, then the IRLib_HashRaw.h MUST be the last protocol listed, and the IRLibCombo.h MUST be very last.
The example 'record' that comes with IRLib2 will capture a Raw code but then it won't send it back out for some reason, but you can capture a Raw code, then copy and paste it into your own send Raw code. Look at rawRecv and rawSend. But again, the code I mentioned above will allow you to send known protocols and unknown protocols from the same Arduino code.
Now, why did I go to all this trouble? I just wanted a custom remote for all my devices, that I could also use to shoot at the kids' laser tag guns. And they wouldn't have any idea what hit them.