IRremote
IRremote.h
Go to the documentation of this file.
1 
7 #ifndef IRremote_h
8 #define IRremote_h
9 
10 #include "IRremote.hpp"
11 
12 #warning It seems, that you are using an old version 2.0 code / example.
13 #warning This version is no longer supported!
14 #warning Upgrade instructions can be found here: https://github.com/Arduino-IRremote/Arduino-IRremote?tab=readme-ov-file#converting-your-2x-program-to-the-4x-version
15 #warning Please use one of the new code examples from the library, available at "File > Examples > Examples from Custom Libraries / IRremote".
16 #warning Start with the SimpleReceiver or SimpleSender example.
17 #warning The examples are documented here: https://github.com/Arduino-IRremote/Arduino-IRremote?tab=readme-ov-file#examples-for-this-library
18 #warning Or just downgrade your library to version 2.6.0.
19 
20 /**********************************************************************************************************************
21  * The OLD and DEPRECATED decode function with parameter aResults, kept for backward compatibility to old 2.0 tutorials
22  * This function calls the old MSB first decoders and fills only the 3 variables:
23  * aResults->value
24  * aResults->bits
25  * aResults->decode_type
26  * It prints a message on the first call.
27  **********************************************************************************************************************/
28 bool IRrecv::decode(decode_results *aResults) {
29  static bool sMessageWasSent = false;
30  if (!sMessageWasSent) {
31  Serial.println(F("**************************************************************************************************"));
32  Serial.println(F("Thank you for using the IRremote library!"));
33  Serial.println(F("It seems, that you are using an old version 2.0 code / example."));
34  Serial.println(F("This version is no longer supported!"));
35  Serial.println();
36  Serial.println(F("Upgrade instructions can be found here:"));
37  Serial.println(F(" https://github.com/Arduino-IRremote/Arduino-IRremote?tab=readme-ov-file#converting-your-2x-program-to-the-4x-version"));
38  Serial.println();
39  Serial.println(F("Please use one of the new code examples from the library,"));
40  Serial.println(F(" available at \"File > Examples > Examples from Custom Libraries / IRremote\"."));
41  Serial.println(F("Start with the SimpleReceiver or SimpleSender example."));
42  Serial.println(F("The examples are documented here:"));
43  Serial.println(F(" https://github.com/Arduino-IRremote/Arduino-IRremote?tab=readme-ov-file#examples-for-this-library"));
44  Serial.println();
45  Serial.println(F("Or just downgrade your library to version 2.6.0."));
46  Serial.println();
47  Serial.println(F("Thanks"));
48  Serial.println(F("**************************************************************************************************"));
49  Serial.println();
50  Serial.println();
51  sMessageWasSent = true;
52  }
53  return decode_old(aResults);
54 }
55 
56 #endif // IRremote_h
57 #pragma once
58 
decode_results
Results returned from old decoders !!!deprecated!!!
Definition: IRremoteInt.h:188
IRremote.hpp
Public API to the library.
IRrecv::decode
bool decode()
The main decode function, attempts to decode the recently receive IR signal.
Definition: IRReceive.hpp:547
IRrecv::decode_old
bool decode_old(decode_results *aResults)
Definition: IRReceive.hpp:1933