Documentation
This commit is contained in:
parent
c6c7f17f58
commit
02c0e24da9
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -137,13 +137,16 @@ void setup() {
|
|||
|
||||
#if FLASHEND >= 0x3FFF // For 16k flash or more, like ATtiny1604. Code does not fit in program memory of ATtiny85 etc.
|
||||
Serial.println();
|
||||
Serial.print(F("If you connect debug pin "));
|
||||
if (digitalRead(DEBUG_BUTTON_PIN) != LOW) {
|
||||
Serial.print(F("If you connect debug pin "));
|
||||
# if defined(APPLICATION_PIN_STRING)
|
||||
Serial.print(APPLICATION_PIN_STRING);
|
||||
Serial.print(APPLICATION_PIN_STRING);
|
||||
# else
|
||||
Serial.print(DEBUG_BUTTON_PIN);
|
||||
Serial.print(DEBUG_BUTTON_PIN);
|
||||
# endif
|
||||
Serial.println(F(" to ground, raw data is always printed"));
|
||||
Serial.print(F(" to ground, "));
|
||||
}
|
||||
Serial.println(F("raw data is always printed"));
|
||||
|
||||
// infos for receive
|
||||
Serial.print(RECORD_GAP_MICROS);
|
||||
|
@ -201,9 +204,10 @@ void loop() {
|
|||
Serial.println(F("Received noise or an unknown (or not yet enabled) protocol"));
|
||||
}
|
||||
IrReceiver.printIRResultRawFormatted(&Serial, true);
|
||||
} else {
|
||||
}
|
||||
if (IrReceiver.decodedIRData.protocol != UNKNOWN) {
|
||||
/*
|
||||
* This is the info output for a successful receive in normal mode
|
||||
* The info output for a successful receive
|
||||
*/
|
||||
IrReceiver.printIRResultShort(&Serial);
|
||||
IrReceiver.printIRSendUsage(&Serial);
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
************************************************************************************
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2022-2023 Armin Joachimsmeyer
|
||||
* Copyright (c) 2022-2024 Armin Joachimsmeyer
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -56,13 +56,17 @@
|
|||
//#define TRACE // to see the state of the ISR state machine
|
||||
|
||||
/*
|
||||
* Set compile options to modify the generated code.
|
||||
* Protocol selection
|
||||
*/
|
||||
//#define DISABLE_PARITY_CHECKS // Disable parity checks. Saves 48 bytes of program memory.
|
||||
//#define USE_EXTENDED_NEC_PROTOCOL // Like NEC, but take the 16 bit address as one 16 bit value and not as 8 bit normal and 8 bit inverted value.
|
||||
//#define USE_ONKYO_PROTOCOL // Like NEC, but take the 16 bit address and command each as one 16 bit value and not as 8 bit normal and 8 bit inverted value.
|
||||
//#define USE_FAST_PROTOCOL // Use FAST protocol (no address and 16 bit data, interpreted as 8 bit command and 8 bit inverted command) instead of NEC / ONKYO.
|
||||
//#define ENABLE_NEC2_REPEATS // Instead of sending / receiving the NEC special repeat code, send / receive the original frame for repeat.
|
||||
//#define USE_FAST_PROTOCOL // Use FAST protocol instead of NEC / ONKYO.
|
||||
//#define ENABLE_NEC2_REPEATS // Instead of sending / receiving the NEC special repeat code, send / receive the original frame for repeat.
|
||||
/*
|
||||
* Set compile options to modify the generated code.
|
||||
*/
|
||||
//#define DISABLE_PARITY_CHECKS // Disable parity checks. Saves 48 bytes of program memory.
|
||||
//#define USE_CALLBACK_FOR_TINY_RECEIVER // Call the fixed function "void handleReceivedTinyIRData()" each time a frame or repeat is received.
|
||||
|
||||
#include "TinyIRReceiver.hpp" // include the code
|
||||
|
@ -113,6 +117,9 @@ void loop() {
|
|||
}
|
||||
if (TinyIRReceiverData.Flags == IRDATA_FLAGS_PARITY_FAILED) {
|
||||
Serial.print(F(" Parity failed"));
|
||||
#if !defined(USE_EXTENDED_NEC_PROTOCOL) && !defined(USE_ONKYO_PROTOCOL)
|
||||
Serial.print(F(", try USE_EXTENDED_NEC_PROTOCOL or USE_ONKYO_PROTOCOL"));
|
||||
#endif
|
||||
}
|
||||
Serial.println();
|
||||
}
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
* ATtiny1614 8|PA1 10|PA3 1|PA5 MegaTinyCore
|
||||
* SAMD21 3 4 5
|
||||
* ESP8266 14|D5 12|D6 %
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7
|
||||
* BluePill PA6 PA7 PA3
|
||||
* ESP32 15 4 27
|
||||
* ESP32-C3 6 7 10
|
||||
* BluePill PA6 PA7 PA3
|
||||
* APOLLO3 11 12 5
|
||||
* RP2040 3|GPIO15 4|GPIO16 5|GPIO17
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
************************************************************************************
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2020-2023 Armin Joachimsmeyer
|
||||
* Copyright (c) 2020-2024 Armin Joachimsmeyer
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -118,7 +118,7 @@ struct IRData {
|
|||
uint16_t numberOfBits; ///< Number of bits received for data (address + command + parity) - to determine protocol length if different length are possible.
|
||||
uint8_t flags; ///< IRDATA_FLAGS_IS_REPEAT, IRDATA_FLAGS_WAS_OVERFLOW etc. See IRDATA_FLAGS_* definitions above
|
||||
|
||||
//These 2 variables allow to call resume() directly after decode, if no dump is required. Since 4.3.0.
|
||||
// These 2 variables allow to call resume() directly after decode, if no dump is required. Since 4.3.0.
|
||||
#if RAW_BUFFER_LENGTH <= 254 // saves around 75 bytes program memory and speeds up ISR
|
||||
uint_fast8_t rawlen; ///< counter of entries in rawbuf
|
||||
#else
|
||||
|
|
|
@ -1473,7 +1473,7 @@ void IRrecv::printIRResultMinimal(Print *aSerial) {
|
|||
*/
|
||||
void IRrecv::printIRResultRawFormatted(Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks) {
|
||||
|
||||
uint8_t tRawlen = decodedIRData.rawlen; // Get it once here in order to print quite consistent data, even if ISR is running
|
||||
uint8_t tRawlen = decodedIRData.rawlen;
|
||||
// Print Raw data
|
||||
aSerial->print(F("rawData["));
|
||||
aSerial->print(tRawlen, DEC);
|
||||
|
|
|
@ -76,6 +76,9 @@
|
|||
//#define LOCAL_DEBUG // This enables debug output only for this file
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Protocol selection
|
||||
*/
|
||||
//#define DISABLE_PARITY_CHECKS // Disable parity checks. Saves 48 bytes of program memory.
|
||||
//#define USE_EXTENDED_NEC_PROTOCOL // Like NEC, but take the 16 bit address as one 16 bit value and not as 8 bit normal and 8 bit inverted value.
|
||||
//#define USE_ONKYO_PROTOCOL // Like NEC, but take the 16 bit address and command each as one 16 bit value and not as 8 bit normal and 8 bit inverted value.
|
||||
|
|
Loading…
Reference in New Issue