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
[](https://github.com/z3t0/Arduino-IRremote/commits/master)
@@ -17,7 +17,7 @@ Tutorials and more information will be made available on [the official homepage]
17
17
Click on the LibraryManager badge above to see the [instructions](https://www.ardu-badge.com/IRremote/zip).
Protocols can be switched off and on by changing the lines in *IRremote.h*:
22
22
23
23
```
@@ -41,7 +41,7 @@ In the new version you will send NEC commands not by 32 bit codes but by a (cons
41
41
42
42
# FAQ
43
43
- IR does not work right when I use Neopixels (aka WS2811/WS2812/WS2812B)<br/>
44
-
Whether you use the Adafruit Neopixel lib, or FastLED, interrupts get disabled on many lower end CPUs like the basic Arduinos for longer than 50 µs.
44
+
Whether you use the Adafruit Neopixel lib, or FastLED, interrupts get disabled on many lower end CPUs like the basic Arduinos for longer than 50 µs.
45
45
In turn, this stops the IR interrupt handler from running when it needs to. There are some solutions to this on some processors,
46
46
[see this page from Marc MERLIN](http://marc.merlins.org/perso/arduino/post_2017-04-03_Arduino-328P-Uno-Teensy3_1-ESP8266-ESP32-IR-and-Neopixels.html)
47
47
- The default IR timer on AVR's is timer 2. Since the **Arduino Tone library** as well as **analogWrite() for pin 3 and pin 11** requires timer 2,
@@ -81,6 +81,7 @@ Modify it by commenting them out or in, or change the values if applicable. Or d
81
81
82
82
| Name | File | Default value | Description |
83
83
|-|-|-|-|
84
+
|`USE_OLD_DECODE`| IRremoteint.h | disabled | Enables the old decoder in order to be version 2.x compatible, where all protocols were MSB first. |
84
85
|`EXCLUDE_EXOTIC_PROTOCOLS`| Before `#include <IRremote.h>`| disabled | If activated, BOSEWAVE, MAGIQUEST,WHYNTER and LEGO_PF are excluded in `decode()` and in sending with `IrSender.write()`. Saves up to 900 bytes program space. |
85
86
|`MARK_EXCESS_MICROS`| Before `#include <IRremote.h>`| 20 | MARK_EXCESS_MICROS is subtracted from all marks and added to all spaces before decoding, to compensate for the signal forming of different IR receiver modules. |
86
87
|`IR_INPUT_IS_ACTIVE_HIGH`| IRremoteInt.h | disabled | Enable it if you use a RF receiver, which has an active HIGH output signal. |
@@ -170,7 +171,7 @@ The **durations** you receive are likely to be longer for marks and shorter for
170
171
but this depends on the receiver circuit in use. Most protocols use multiples of one time-unit for marks and spaces like e.g. [NEC](https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/src/ir_NEC.cpp#L50). It's easy to be off-by-one with the last bit, since the last space is not recorded by IRremote.
171
172
172
173
Try to make use of the template functions `decodePulseDistanceData()` and `sendPulseDistanceData()`.
173
-
If your protocol supports address and code fields, try to reflect this in your api like it is done in [`sendNEC(uint16_t aAddress, uint8_t aCommand, uint8_t aNumberOfRepeats, bool aIsRepeat)`](https://github.com/z3t0/Arduino-IRremote/blob/master/src/ir_NEC.cpp#L86) and [`decodeNEC()`](https://github.com/z3t0/Arduino-IRremote/blob/master/src/ir_NEC.cpp#L145).<br/>
174
+
If your protocol supports address and code fields, try to reflect this in your api like it is done in [`sendNEC(uint16_t aAddress, uint8_t aCommand, uint_fast8_t aNumberOfRepeats, bool aIsRepeat)`](https://github.com/z3t0/Arduino-IRremote/blob/master/src/ir_NEC.cpp#L86) and [`decodeNEC()`](https://github.com/z3t0/Arduino-IRremote/blob/master/src/ir_NEC.cpp#L145).<br/>
174
175
175
176
### Integration
176
177
To integrate your protocol, you need to extend the two functions `decode()` and `getProtocolString()` in *IRreceice.cpp*,
@@ -205,6 +206,32 @@ BTW, **the best way to increase the IR power** is to use 2 or 3 IR diodes in ser
205
206
To keep the current, you must reduce the resistor by (5 - 1.3) / (5 - 2.6) = 1.5 e.g. from 150 ohm to 100 ohm for 25 mA and 2 diodes with 1.3 volt and a 5 volt supply.<br/>
206
207
For 3 diodes it requires factor 2.5 e.g. from 150 ohm to 60 ohm.
207
208
209
+
# Quick comparison of 4 Arduino IR receiving libraries
210
+
## This is a short comparison and may not be complete or correct
211
+
I created this comparison matrix for [myself](https://github.com/ArminJo) in order to choose a small IR lib for my project and to have a quick overview, when to choose which library.<br/>
212
+
It is dated from **03.02.2021**. If you have complains about the data or request for extensions, please send a PM or open a discussion.
| Number of protocols |**50**| Nec + Panasonic + Hash \*| 12 + Hash \*| 17 + Hash \*| NEC |
217
+
| 3.Party libs needed| % | PinChangeInterrupt if not pin 2 or 3 | % | % | % |
218
+
| Timing method receive | Timer2 or interrupt for pin 2 or 3 |**Interrupt**| Timer2 or interrupt for pin 2 or 3 | Timer2 or interrupt for NEC |**Interrupt**|
219
+
| Timing method send | PWM and timing with Timer2 interrupts | Timer2 interrupts | Timer2 and blocking wait | PWM with Timer2 and blocking wait with delayMicroseconds() | % |
220
+
| Send pins| All | All | All ? | Timer dependent | % |
| FLASH usage (simple NEC example with 5 prints) | 1820<br/>(4300 for 15 main / 8000 for all 40 protocols)<br/>(+200 for callback)<br/>(+80 for interrupt at pin 2+3)| 1270<br/>(1400 for pin 2+3) | 4830 | 1770 |**900**|
| Remarks | Decodes 40 protocols concurrently.<br/>39 Protocols to send.<br/>Work in progress. | Only one protocol at a time. | Consists of 5 libraries. **Project containing bugs - 45 issues, no reaction for at least one year.**| Decoding and sending are easy to extend.<br/>Supports **Pronto** codes. | Requires no timer. |
231
+
232
+
\* The Hash protocol gives you a hash as code, which may be sufficient to distinguish your keys on the remote, but may not work with some protocols like Mitsubishi
Please only email me if it is more appropriate than creating an Issue / PR. I **will** not respond to requests for adding support for particular boards, unless of course you are the creator of the board and would like to cooperate on the project. I will also **ignore** any emails asking me to tell you how to implement your ideas. However, if you have a private inquiry that you would only apply to you and you would prefer it to be via email, by all means.
0 commit comments