This particular program is admittedly not a much practical use. It allows you to transmit a sample signal using any of the 12 supported protocols and their various variants. We use it to debug the software. It illustrates how each of the 12 protocols works. Additional details on the protocols can be found in the IRLib2 users manual available on GitHub at https://github.com/cyborg5/IRLib2/tree/master/IRLib2/manuals
You can find this program in the "Adafruit_CircuitPlayground/examples" folder. We will not bother to reproduce a listing here. You should upload the program using the Arduino IDE and open the serial monitor. You will be prompted to type a number from 1 to 12 to send out test signals for any of the 12 supported protocols. Or you can enter "-1" and it will cycle through all 12 protocols. Note that the signals we are sending are not necessarily valid bit patterns for any particular function in that protocol. Rather they have been chosen to illustrate some of the features of those protocols.
You need another Arduino set up to receive IR signals using IRLib2 running the "dump" example or Circuit Playground Express using the Infrared_Read program. It will receive the signals transmitted by this program and you can verify that the transmission is working properly. Here is the output from this program.
Type the protocol number: 1-12 Or '-1' for all
Protocol #1 NEC data = 0x12345678
Protocol #1 NEC data = 0xFFFFFFFF
Protocol #1 NEC data = 0x12345678 data2 = 0x28 40 dec
Protocol #2 Sony data = 0x12345678 data2 = 0xC 12 dec
Protocol #2 Sony data = 0x12345678 data2 = 0xF 15 dec
Protocol #2 Sony data = 0x12345678 data2 = 0x14 20 dec
Protocol #3 RC5 data = 0xFFFFFFFF data2 = 0xD 13 dec
Protocol #3 RC5 data = 0xFFFFFFFF data2 = 0xE 14 dec
Protocol #3 RC5 data = 0xFFFFFFFF data2 = 0xE 14 dec khz=57
Protocol #4 RC6 data = 0xFFFF data2 = 0x14 20 dec
Protocol #4 RC6 data = 0xCFFFFF data2 = 0x18 24 dec
Protocol #4 RC6 data = 0xCFFFFF data2 = 0x1C 28 dec
Protocol #4 RC6 data = 0xFFFFFFFF data2 = 0x20 32 dec
Protocol #5 Panasonic Old data = 0xFFFFFFFF
Protocol #6 JVC data = 0x12345678 data2 = 0x1 1 dec
Protocol #6 JVC data = 0x12345678
Protocol #7 NECx data = 0x12345678
Protocol #7 NECx data = 0xFFFFFFFF
Protocol #8 Samsung36 data = 0x12345 data2 = 0x1234 4660 dec
Protocol #9 G.I.Cable data = 0x12345678
Protocol #9 G.I.Cable data = 0xFFFFFFFF
Protocol #10 DirecTV data = 0x12345678
Protocol #10 DirecTV data = 0x12345678 data2 = 0x1 1 dec
Protocol #10 DirecTV data = 0x12345678 khz=40
Protocol #11 rcmm data = 0xFFFFFFFF data2 = 0xC 12 dec
Protocol #11 rcmm data = 0xFFFFFFFF data2 = 0x18 24 dec
Protocol #11 rcmm data = 0xFFFFFFFF data2 = 0x20 32 dec
Protocol #12 CYKM data = 0x2001
Protocol #12 CYKM data = 0x2004
Protocol #12 CYKM data = 0x2002
Protocol #12 CYKM data = 0x2008
Here is the output you would see on another Arduino receiving these signals.
Ready to receive IR signals
Decoded NEC(1): Value:12345678 Adrs:0 (32 bits)
Decoded NEC(1): Value:FFFFFFFF Adrs:0 (0 bits)
Decoded NEC(1): Value:12345678 Adrs:0 (32 bits)
Decoded Sony(2): Value:678 Adrs:0 (12 bits)
Decoded Sony(2): Value:678 Adrs:0 (12 bits)
Decoded Sony(2): Value:678 Adrs:0 (12 bits)
Decoded Sony(2): Value:5678 Adrs:0 (15 bits)
Decoded Sony(2): Value:5678 Adrs:0 (15 bits)
Decoded Sony(2): Value:5678 Adrs:0 (15 bits)
Decoded Sony(2): Value:45678 Adrs:0 (20 bits)
Decoded Sony(2): Value:45678 Adrs:0 (20 bits)
Decoded Sony(2): Value:45678 Adrs:0 (20 bits)
Decoded RC5(3): Value:1FFF Adrs:0 (13 bits)
Decoded RC5(3): Value:3FFF Adrs:0 (14 bits)
Decoded RC5(3): Value:3FFF Adrs:0 (14 bits)
Decoded RC6(4): Value:FFFF Adrs:0 (20 bits)
Decoded RC6(4): Value:CFFFFF Adrs:0 (24 bits)
Decoded RC6(4): Value:CFFFFF Adrs:0 (28 bits)
Decoded RC6(4): Value:FFFFFFFF Adrs:0 (32 bits)
Decoded Panasonic Old(5): Value:3FFFFF Adrs:0 (22 bits)
Decoded JVC(6): Value:5678 Adrs:1 (16 bits)
Decoded JVC(6): Value:5678 Adrs:0 (16 bits)
Decoded JVC(6): Value:5678 Adrs:0 (16 bits)
Decoded NECx(7): Value:12345678 Adrs:0 (32 bits)
Decoded NECx(7): Value:FFFFFFFF Adrs:0 (0 bits)
Decoded Samsung36(8): Value:12345 Adrs:1234 (36 bits)
Decoded G.I.Cable(9): Value:5678 Adrs:0 (16 bits)
Decoded NEC(1): Value:FFFFFFFF Adrs:0 (0 bits)
Decoded DirecTV(10): Value:5678 Adrs:0 (16 bits)
Decoded DirecTV(10): Value:5678 Adrs:1 (16 bits)
Decoded DirecTV(10): Value:5678 Adrs:0 (16 bits)
Decoded rcmm(11): Value:FFF Adrs:0 (12 bits)
Decoded rcmm(11): Value:FFFFFF Adrs:0 (24 bits)
Decoded rcmm(11): Value:FFFFFFFF Adrs:0 (32 bits)
Gap=38622 CYKM decoded:2001 Mouse move right 0
Gap=37282 CYKM decoded:2004 Mouse move up 0
Gap=37442 CYKM decoded:2002 Mouse move left 0
Gap=37562 CYKM decoded:2008 Mouse move down 0
Page last edited July 02, 2017
Text editor powered by tinymce.