You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -598,7 +598,9 @@ A simple example can be tested online with [WOKWI](https://wokwi.com/projects/33
598
598
599
599
#### TinyReceiver + TinySender
600
600
If **code size** or **timer usage** matters, look at these examples.<br/>
601
-
The **[TinyReceiver](https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/examples/TinyReceiver/TinyReceiver.ino)** example uses the **TinyIRReceiver** library which can **only receive NEC, Extended NEC, ONKYO and FAST protocols, but does not require any timer**. They use pin change interrupt for on the fly decoding, which is the reason for the restricted protocol choice.<br/>
601
+
The **[TinyReceiver](https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/examples/TinyReceiver/TinyReceiver.ino)** example uses the **TinyIRReceiver** library
602
+
which can **only receive NEC, Extended NEC, ONKYO and FAST protocols, but does not require any timer**.
603
+
They use pin change interrupt for on the fly decoding, which is the reason for the restricted protocol choice.<br/>
602
604
TinyReceiver can be tested online with [WOKWI](https://wokwi.com/arduino/projects/339264565653013075).
603
605
604
606
The **[TinySender](https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/examples/TinySender/TinySender.ino)** example uses the **TinyIRSender** library which can **only send NEC, ONKYO and FAST protocols**.<br/>
@@ -718,13 +720,15 @@ These next macros for **TinyIRReceiver** must be defined in your program before
718
720
| `NO_LED_FEEDBACK_CODE` | disabled | Disables the feedback LED function. Saves 14 bytes program memory. |
719
721
| `DISABLE_PARITY_CHECKS` | disabled | Disables the addres and command parity checks. Saves 48 bytes program memory. |
720
722
| `USE_EXTENDED_NEC_PROTOCOL` | disabled | Like NEC, but take the 16 bit address as one 16 bit value and not as 8 bit normal and 8 bit inverted value. |
721
-
| `USE_ONKYO_PROTOCOL` | disabled | Like NEC, but take both the 16 bit address and command each as one 16 bit value and not as 8 bit normal and 8 bit inverted value. |
723
+
| `USE_ONKYO_PROTOCOL` | disabled | 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. |
722
724
| `USE_FAST_PROTOCOL` | disabled | Use FAST protocol (no address and 16 bit data, interpreted as 8 bit command and 8 bit inverted command) instead of NEC. |
723
725
| `ENABLE_NEC2_REPEATS` | disabled | Instead of sending / receiving the NEC special repeat code, send / receive the original frame for repeat. |
724
726
| `USE_CALLBACK_FOR_TINY_RECEIVER` | disabled | Call the fixed function `void handleReceivedTinyIRData()` each time a frame or repeat is received. |
725
727
726
728
The next macro for **IRCommandDispatcher** must be defined in your program before the line `#include <IRCommandDispatcher.hpp>` to take effect.
729
+
| `USE_TINY_IR_RECEIVER` | disabled | Use [TinyReceiver](https://github.com/Arduino-IRremote/Arduino-IRremote#tinyreceiver--tinysender) for receiving IR codes. |
727
730
| `IR_COMMAND_HAS_MORE_THAN_8_BIT` | disabled | Enables mapping and dispatching of IR commands consisting of more than 8 bits. Saves up to 160 bytes program memory and 4 bytes RAM + 1 byte RAM per mapping entry. |
731
+
| `BUZZER_PIN` | | If `USE_TINY_IR_RECEIVER` is enabled, the pin to be used for the optional 50 ms buzzer feedback before executing a command. Other IR libraries than Tiny are not compatible with tone() command. |
728
732
729
733
### Changing include (*.h) files with Arduino IDE
730
734
First, use *Sketch > Show Sketch Folder (Ctrl+K)*.<br/>
#defineIR_COMMAND_FLAG_NON_BLOCKING0x02// Non blocking (short) command that can be processed any time and may interrupt other IR commands - used for stop, set direction etc.
#defineDELAY_AND_RETURN_IF_STOP(aDurationMillis) if (IRDispatcher.delayAndCheckForStop(aDurationMillis)) return
78
-
79
91
classIRCommandDispatcher {
80
92
public:
81
93
voidinit();
94
+
voidprintIRInfo(Print *aSerial);
82
95
83
96
boolcheckAndRunNonBlockingCommands();
84
97
boolcheckAndRunSuspendedBlockingCommands();
@@ -107,7 +120,8 @@ class IRCommandDispatcher {
107
120
bool justCalledBlockingCommand = false; // Flag that a blocking command was received and called - is set before call of command
108
121
/*
109
122
* Flag for running blocking commands to terminate. To check, you can use "if (IRDispatcher.requestToStopReceived) return;" (available as macro RETURN_IF_STOP).
110
-
* Is reset by next IR command received. Can be reset by main loop, if command has stopped.
123
+
* It is set if a blocking IR command received, which cannot be executed directly. Can be reset by main loop, if command has stopped.
124
+
* It is reset before executing a blocking command.
0 commit comments