-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
1,956 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,37 @@ | ||
IRsmallDecoder | ||
============== | ||
|
||
Release 1.1.0 - 08/02/2020 | ||
-------------------------- | ||
v1.2.0 (2022-01-16) | ||
------------------- | ||
* Added the dataAvailable() overload method | ||
* Added methods to enable/disable the decoder | ||
* Added an example for the enable/disable methods | ||
* Fixed the possibility of needlessly dismissed codes (issue #5) | ||
* Improved the NEC/NECx and SIRC12/15 decoders (small improvement) | ||
* Improved some of the examples | ||
* Formatted the code in a more normalized way | ||
* Corrected and added code comments | ||
* Corrected and updated the documentation | ||
|
||
|
||
v1.1.0 (2020-02-08) | ||
------------------- | ||
* Added SAMSUNG protocol (old standard) | ||
* Added SAMSUNG32 protocol | ||
* Added Samsung example sketch | ||
* Added support for ATtiny 24/44/84/25/45/85 | ||
|
||
|
||
Release 1.0.0 - 24/01/2020 | ||
-------------------------- | ||
v1.0.0 (2020-01-24) | ||
------------------- | ||
This is the first public release | ||
|
||
Main features: | ||
* NEC, RC5 and SIRC protocols are supported; | ||
* IR Codes' data is separated; | ||
* Unwanted initial repetitions are ignored; | ||
* Held keys signalization is standardized; | ||
* Signal tolerances are very loose; | ||
* SRAM and Flash memory usage is low; | ||
* No timers required; | ||
* Uses one hardware interrupt. | ||
* NEC, RC5 and SIRC protocols are supported | ||
* IR Codes' data is separated | ||
* Unwanted initial repetitions are ignored | ||
* Held keys are signalized by a boolean variable | ||
* Signal tolerances are very loose | ||
* SRAM and Flash memory usage is low | ||
* No timers required | ||
* Uses one hardware interrupt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,45 @@ | ||
/* A simple example, using the IRsmallDecoder library, | ||
* for testing remote controls that use the Sony SIRC protocol. | ||
* | ||
* Note: this example uses an advanced implementation of the SIRC decoder which | ||
* | ||
* This example uses an advanced implementation of the SIRC decoder which | ||
* takes advantage of the fact that most SIRC remotes will send three signal frames | ||
* every time one key is pressed. That allows the decoder to: | ||
* - identify the number of bits of the protocol; | ||
* - identify the number of bits of the protocol (12, 15 or 20); | ||
* - ignore the two additional repetitions; | ||
* - use the repetitions to check for errors; | ||
* - determine if a key is being held. | ||
* | ||
* In this example it's assumed that the IR sensor is connected to digital pin 2 and | ||
* If the decoder detects 12 or 15 bits, the ext data member is set to 0. | ||
* If it detects a 20-bit code, it will save the extended data in the ext member. | ||
* | ||
* In this example it's assumed that the IR receiver is connected to digital pin 2 and | ||
* the pin is usable for external interrupts. | ||
* | ||
* For more information on the boards' usable pins, see the library documentation at: | ||
* https://github.com/LuisMiCa/IRsmallDecoder | ||
* or the README.pdf file in the extras folder of this library. | ||
*/ | ||
|
||
#define IR_SMALLD_SIRC //1st: define which protocol to use and then, | ||
#include <IRsmallDecoder.h> //2nd: include the library; | ||
IRsmallDecoder irDecoder(2); //3rd: create one decoder object with the correct digital pin; | ||
irSmallD_t irData; //4th: declare one decoder data structure; | ||
#define IR_SMALLD_SIRC //1st: define which protocol to use and then, | ||
#include <IRsmallDecoder.h> //2nd: include the library; | ||
IRsmallDecoder irDecoder(2); //3rd: create one decoder object with the correct digital pin; | ||
irSmallD_t irData; //4th: declare one decoder data structure; | ||
|
||
void setup() { | ||
Serial.begin(250000); | ||
Serial.println("Waiting for a SIRC remote control IR signal..."); | ||
Serial.println("held\t addr\t cmd"); | ||
Serial.println("held\taddr\tcmd \tExt"); | ||
} | ||
|
||
void loop() { | ||
if(irDecoder.dataAvailable(irData)) { //5th: if the decoder has some new data available, | ||
Serial.print(irData.keyHeld,HEX); //6th: do something with the data. | ||
Serial.print("\t "); | ||
Serial.print(irData.addr,HEX); | ||
Serial.print("\t "); | ||
Serial.println(irData.cmd,HEX); | ||
if (irDecoder.dataAvailable(irData)) { //5th: if the decoder has some new data available, | ||
Serial.print(irData.keyHeld, HEX); //6th: do something with the data. | ||
Serial.print(" \t"); | ||
Serial.print(irData.addr, HEX); | ||
Serial.print(" \t"); | ||
Serial.print(irData.cmd, HEX); | ||
Serial.print(" \t"); | ||
Serial.println(irData.ext, HEX); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* A simple example, using the IRsmallDecoder library, for testing remote controls | ||
* that use the Sony SIRC12, SIRC15 or SIRC20 protocols. | ||
* | ||
* Notes: | ||
* - Unlike IR_SMALLD_SIRC, IR_SMALLD_SIRC12/15/20 do not have the keyHeld data member; | ||
* - IR_SMALLD_SIRC20 has an additional data member (ext); | ||
* - Each keypress on a SIRC remote, usually sends three signal frames. The two additional | ||
* signal repetitions are ignored in the IR_SMALLD_SIRC, but not in the IR_SMALLD_SIRC12/15/20; | ||
* - IR_SMALLD_SIRC12 will receive signals from SIRC15 and SIRC20, but the codes will not be correct; | ||
* - In a similar way, IR_SMALLD_SIRC15 will receive signals from SIRC20, but not from SIRC12. | ||
* | ||
* In this example it's assumed that the IR receiver is connected to digital pin 2 and | ||
* the pin is usable for external interrupts. | ||
* | ||
* For more information on the boards' usable pins, see the library documentation at: | ||
* https://github.com/LuisMiCa/IRsmallDecoder | ||
* or the README.pdf file in the extras folder of this library. | ||
*/ | ||
|
||
|
||
#define IR_SMALLD_SIRC12 //1st: define which protocol to use; | ||
//#define IR_SMALLD_SIRC15 | ||
//#define IR_SMALLD_SIRC20 | ||
|
||
#include <IRsmallDecoder.h> //2nd: include the library; | ||
IRsmallDecoder irDecoder(2); //3rd: create one decoder object with the correct digital pin; | ||
irSmallD_t irData; //4th: declare one decoder data structure; | ||
|
||
void setup() { | ||
Serial.begin(250000); | ||
#if defined(IR_SMALLD_SIRC12) | ||
Serial.println("Waiting for a SIRC12 remote control IR signal..."); | ||
Serial.println("Addr\tCmd"); | ||
#elif defined(IR_SMALLD_SIRC15) | ||
Serial.println("Waiting for a SIRC15 remote control IR signal..."); | ||
Serial.println("Addr\tCmd"); | ||
#elif defined(IR_SMALLD_SIRC20) | ||
Serial.println("Waiting for a SIRC20 remote control IR signal..."); | ||
Serial.println("Addr\tCmd \tExt"); | ||
#endif | ||
} | ||
|
||
void loop() { | ||
if (irDecoder.dataAvailable(irData)) { //5th: if the decoder has some new data available, | ||
Serial.print(irData.addr, HEX); //6th: do something with the data. | ||
Serial.print(" \t"); | ||
#if defined(IR_SMALLD_SIRC12) || defined(IR_SMALLD_SIRC15) | ||
Serial.println(irData.cmd, HEX); | ||
#else | ||
Serial.print(irData.cmd, HEX); | ||
Serial.print(" \t"); | ||
Serial.println(irData.ext, HEX); | ||
#endif | ||
} | ||
} |
Oops, something went wrong.