Eigentlich muß man nur den Tastencode im eignen Programm auswerten, so das Protokoll der Bibliothek bekannt ist.
Ich habe beispielsweise eine Panasonic-Fernbedienung, also wähle ich im Beispielprogramm SimpleReceiver.ino #define DECODE_PANASONIC und erhalte diese Ausgabe im seriellen Monitor, wenn ich drei verschiedene Tasten drücke:
Da Du nicht weißt, welches Protokoll Deine Fernbedienung verwendet, nutzt Du das Bibliotheksbeispiel ReceiveDump.ino zur Analyse. Drei unterschiedliche Fernbedienungen aus meinem Haushalt:
START F:\Arduino\libraries\IRremote\examples\ReceiveDump\ReceiveDump.ino from Apr 20 2022
Using library version 3.6.1
Ready to receive IR signals of protocols: NEC, Panasonic/Kaseikyo, Denon/Sharp, Sony, RC5, RC6, LG, JVC, Samsung, Whynter, Lego Power Functions, Bosewave , MagiQuest, Universal Distance, Hash at pin 2
5000 us is the (minimum) gap, after which the start of a new IR packet is assumed
20 us are subtracted from all marks and added to all spaces for decoding
Protocol=PANASONIC Address=0x1B Command=0x43 Extra=0x2002 Raw-Data=0xF24301B0 48 bits LSB first
Raw result in internal ticks (50 us) - with leading gap
rawData[100]:
-65535
+ 70,- 33 + 10,- 7 + 10,- 25 + 10,- 7
+ 10,- 8 + 9,- 8 + 10,- 7 + 10,- 8
+ 9,- 8 + 10,- 8 + 9,- 8 + 9,- 8
+ 10,- 8 + 9,- 8 + 10,- 25 + 9,- 8
+ 10,- 7 + 10,- 8 + 9,- 8 + 10,- 8
+ 9,- 8 + 9,- 26 + 9,- 25 + 10,- 8
+ 9,- 25 + 10,- 25 + 10,- 7 + 10,- 8
+ 9,- 8 + 10,- 8 + 9,- 8 + 9,- 8
+ 10,- 8 + 9,- 25 + 10,- 25 + 10,- 7
+ 10,- 8 + 9,- 8 + 10,- 8 + 9,- 25
+ 10,- 8 + 9,- 8 + 9,- 26 + 9,- 8
+ 10,- 7 + 10,- 25 + 10,- 25 + 9,- 26
+ 9,- 25 + 10
Raw result in microseconds - with leading gap
rawData[100]:
-3276750
+3500,-1650 + 500,- 350 + 500,-1250 + 500,- 350
+ 500,- 400 + 450,- 400 + 500,- 350 + 500,- 400
+ 450,- 400 + 500,- 400 + 450,- 400 + 450,- 400
+ 500,- 400 + 450,- 400 + 500,-1250 + 450,- 400
+ 500,- 350 + 500,- 400 + 450,- 400 + 500,- 400
+ 450,- 400 + 450,-1300 + 450,-1250 + 500,- 400
+ 450,-1250 + 500,-1250 + 500,- 350 + 500,- 400
+ 450,- 400 + 500,- 400 + 450,- 400 + 450,- 400
+ 500,- 400 + 450,-1250 + 500,-1250 + 500,- 350
+ 500,- 400 + 450,- 400 + 500,- 400 + 450,-1250
+ 500,- 400 + 450,- 400 + 450,-1300 + 450,- 400
+ 500,- 350 + 500,-1250 + 500,-1250 + 450,-1300
+ 450,-1250 + 500
Result as internal ticks (50 us) array - compensated with MARK_EXCESS_MICROS=20
uint8_t rawTicks[99] = {70,33, 10,7, 10,25, 10,7, 10,8, 9,8, 10,7, 10,8, 9,8, 10,8, 9,8, 9,8, 10,8, 9,8, 10,25, 9,8, 10,7, 10,8, 9,8, 10,8, 9,8, 9,26, 9,25, 10,8, 9,25, 10,25, 10,7, 10,8, 9,8, 10,8, 9,8, 9,8, 10,8, 9,25, 10,25, 10,7, 10,8, 9,8, 10,8, 9,25, 10,8, 9,8, 9,26, 9,8, 10,7, 10,25, 10,25, 9,26, 9,25, 10}; // Protocol=PANASONIC Address=0x1B Command=0x43 Extra=0x2002 Raw-Data=0xF24301B0 48 bits LSB first
Result as microseconds array - compensated with MARK_EXCESS_MICROS=20
uint16_t rawData[99] = {3480,1670, 480,370, 480,1270, 480,370, 480,420, 430,420, 480,370, 480,420, 430,420, 480,420, 430,420, 430,420, 480,420, 430,420, 480,1270, 430,420, 480,370, 480,420, 430,420, 480,420, 430,420, 430,1320, 430,1270, 480,420, 430,1270, 480,1270, 480,370, 480,420, 430,420, 480,420, 430,420, 430,420, 480,420, 430,1270, 480,1270, 480,370, 480,420, 430,420, 480,420, 430,1270, 480,420, 430,420, 430,1320, 430,420, 480,370, 480,1270, 480,1270, 430,1320, 430,1270, 480}; // Protocol=PANASONIC Address=0x1B Command=0x43 Extra=0x2002 Raw-Data=0xF24301B0 48 bits LSB first
uint16_t address = 0x1B;
uint16_t command = 0x43;
uint32_t data = 0xF24301B0;
Pronto Hex as string
char prontoData[] = "0000 006D 0032 0000 0087 003F 0014 000D 0014 002F 0014 000D 0014 000F 0012 000F 0014 000D 0014 000F 0012 000F 0014 000F 0012 000F 0012 000F 0014 000F 0012 000F 0014 002F 0012 000F 0014 000D 0014 000F 0012 000F 0014 000F 0012 000F 0012 0031 0012 002F 0014 000F 0012 002F 0014 002F 0014 000D 0014 000F 0012 000F 0014 000F 0012 000F 0012 000F 0014 000F 0012 002F 0014 002F 0014 000D 0014 000F 0012 000F 0014 000F 0012 002F 0014 000F 0012 000F 0012 0031 0012 000F 0014 000D 0014 002F 0014 002F 0012 0031 0012 002F 0014 06C3 ";
Protocol=SAMSUNG Address=0x707 Command=0x11 Raw-Data=0xEE110707 32 bits LSB first
Raw result in internal ticks (50 us) - with leading gap
rawData[68]:
-65535
+ 91,- 87 + 13,- 32 + 13,- 32 + 13,- 32
+ 12,- 10 + 13,- 9 + 13,- 10 + 13,- 9
+ 13,- 10 + 13,- 32 + 13,- 31 + 13,- 32
+ 13,- 10 + 13,- 9 + 13,- 10 + 12,- 10
+ 13,- 10 + 13,- 31 + 13,- 10 + 13,- 9
+ 13,- 10 + 13,- 32 + 12,- 10 + 13,- 10
+ 12,- 10 + 13,- 9 + 13,- 32 + 13,- 32
+ 13,- 32 + 12,- 10 + 13,- 32 + 13,- 32
+ 13,- 32 + 13
Raw result in microseconds - with leading gap
rawData[68]:
-3276750
+4550,-4350 + 650,-1600 + 650,-1600 + 650,-1600
+ 600,- 500 + 650,- 450 + 650,- 500 + 650,- 450
+ 650,- 500 + 650,-1600 + 650,-1550 + 650,-1600
+ 650,- 500 + 650,- 450 + 650,- 500 + 600,- 500
+ 650,- 500 + 650,-1550 + 650,- 500 + 650,- 450
+ 650,- 500 + 650,-1600 + 600,- 500 + 650,- 500
+ 600,- 500 + 650,- 450 + 650,-1600 + 650,-1600
+ 650,-1600 + 600,- 500 + 650,-1600 + 650,-1600
+ 650,-1600 + 650
Result as internal ticks (50 us) array - compensated with MARK_EXCESS_MICROS=20
uint8_t rawTicks[67] = {91,87, 13,32, 13,32, 13,32, 12,10, 13,9, 13,10, 13,9, 13,10, 13,32, 13,31, 13,32, 13,10, 13,9, 13,10, 12,10, 13,10, 13,31, 13,10, 13,9, 13,10, 13,32, 12,10, 13,10, 12,10, 13,9, 13,32, 13,32, 13,32, 12,10, 13,32, 13,32, 13,32, 13}; // Protocol=SAMSUNG Address=0x707 Command=0x11 Raw-Data=0xEE110707 32 bits LSB first
Result as microseconds array - compensated with MARK_EXCESS_MICROS=20
uint16_t rawData[67] = {4530,4370, 630,1620, 630,1620, 630,1620, 580,520, 630,470, 630,520, 630,470, 630,520, 630,1620, 630,1570, 630,1620, 630,520, 630,470, 630,520, 580,520, 630,520, 630,1570, 630,520, 630,470, 630,520, 630,1620, 580,520, 630,520, 580,520, 630,470, 630,1620, 630,1620, 630,1620, 580,520, 630,1620, 630,1620, 630,1620, 630}; // Protocol=SAMSUNG Address=0x707 Command=0x11 Raw-Data=0xEE110707 32 bits LSB first
uint16_t address = 0x707;
uint16_t command = 0x11;
uint32_t data = 0xEE110707;
Pronto Hex as string
char prontoData[] = "0000 006D 0022 0000 00B0 00A7 001A 003D 001A 003D 001A 003D 0018 0012 001A 0011 001A 0012 001A 0011 001A 0012 001A 003D 001A 003B 001A 003D 001A 0012 001A 0011 001A 0012 0018 0012 001A 0012 001A 003B 001A 0012 001A 0011 001A 0012 001A 003D 0018 0012 001A 0012 0018 0012 001A 0011 001A 003D 001A 003D 001A 003D 0018 0012 001A 003D 001A 003D 001A 003D 001A 06C3 ";
Protocol=RC5 Address=0x10 Command=0xC Toggle=1 Raw-Data=0x1C0C 13 bits MSB first
Raw result in internal ticks (50 us) - with leading gap
rawData[24]:
-65535
+ 18,- 17 + 18,- 16 + 18,- 17 + 35,- 17
+ 18,- 16 + 18,- 17 + 18,- 16 + 19,- 16
+ 18,- 34 + 18,- 16 + 36,- 16 + 18
Raw result in microseconds - with leading gap
rawData[24]:
-3276750
+ 900,- 850 + 900,- 800 + 900,- 850 +1750,- 850
+ 900,- 800 + 900,- 850 + 900,- 800 + 950,- 800
+ 900,-1700 + 900,- 800 +1800,- 800 + 900
Result as internal ticks (50 us) array - compensated with MARK_EXCESS_MICROS=20
uint8_t rawTicks[23] = {18,17, 18,16, 18,17, 35,17, 18,16, 18,17, 18,16, 19,16, 18,34, 18,16, 36,16, 18}; // Protocol=RC5 Address=0x10 Command=0xC Toggle=1 Raw-Data=0x1C0C 13 bits MSB first
Result as microseconds array - compensated with MARK_EXCESS_MICROS=20
uint16_t rawData[23] = {880,870, 880,820, 880,870, 1730,870, 880,820, 880,870, 880,820, 930,820, 880,1720, 880,820, 1780,820, 880}; // Protocol=RC5 Address=0x10 Command=0xC Toggle=1 Raw-Data=0x1C0C 13 bits MSB first
uint16_t address = 0x10;
uint16_t command = 0xC;
uint32_t data = 0x1C0C;
Pronto Hex as string
char prontoData[] = "0000 006D 000C 0000 0023 0020 0023 001E 0023 0020 0044 0020 0023 001E 0023 0020 0023 001E 0025 001E 0023 0041 0023 001E 0046 001E 0023 06C3 ";