The original IRLib2 was designed to run on 8-bit AVR style microprocessors such as Arduino Uno, Arduino Leonardo, etc. These processors have very limited space and in most applications you only need to use one or two protocols and not all 12. IRLib2 as a clever system of using include files to write an application with only the protocols you need to use. Because the Circuit Playground Express has an ARM 32 bit processor with plenty of memory we have included all 12 protocols by default. But should you have an extensive application and find yourself running short on program memory, you can customize the IRLib2 portion of the Adafruit_CircuitPlayground library to use only a limited set of protocols.

Here is a partial listing of "Adafruit_CircuitProtocol/utility/IRLibCPE.h".

#include "IRLibDecodeBase.h"
#include "IRLibSendBase.h"
#include "IRLib_P01_NEC.h"
#include "IRLib_P02_Sony.h"
#include "IRLib_P03_RC5.h"
#include "IRLib_P04_RC6.h"
#include "IRLib_P05_Panasonic_Old.h"
#include "IRLib_P06_JVC.h"
#include "IRLib_P07_NECx.h"
#include "IRLib_P08_Samsung36.h"
#include "IRLib_P09_GICable.h"
#include "IRLib_P10_DirecTV.h"
#include "IRLib_P11_RCMM.h"
#include "IRLib_P12_CYKM.h"
//include additional protocols here
#include "IRLibCombo.h"
#include "IRLibRecvPCI.h"

This file includes the base code for sending and receiving followed by 12 include statements for each of the supported protocols. If you are not going to use one of these protocols you can edit the file to comment out any of the unused protocols. Do not rearrange the order that the protocols are included. They have to remain in numerical order but you can comment out as many as you want as long as at least one is left.

Furthermore if you're only receiving and not sending you can comment out the

#include "IRLibBase.h"

Similarly if you are only sending but not receiving and decoding you can comment out

#include "IRLibDecodeBase.h"

Again note that you probably have plenty of available program memory on this platform and you need not make these optimizations but we wanted to tell you how to do so if your application was running out of program memory.

This guide was first published on Jul 27, 2017. It was last updated on Jun 28, 2017.

This page (Customizing Supported Protocols) was last updated on Jul 02, 2017.

Text editor powered by tinymce.