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
sketches-exclude: IR2Keyboard,IRUnitTest,IRrelay,ReceiveAndSend,IRreceiveDump,IRsendProntoDemo,MicroGirs,IRDispatcherDemo,LGAirConditionerSendDemo,ReceiverTimingAnalysis # Does not fit in FLASH or RAM, missing digitalPinToInterrupt
105
107
build-properties: # the flags were put in compiler.cpp.extra_flags
sketches-exclude: IR2Keyboard,IRUnitTest,IRrelay,ReceiveAndSend,IRreceiveDump,IRsendProntoDemo,MicroGirs,IRDispatcherDemo,LGAirConditionerSendDemo,ReceiverTimingAnalysis # Does not fit in FLASH or RAM
112
113
build-properties: # the flags were put in compiler.cpp.extra_flags
sketches-exclude: BoseWaveSendDemo,IR2Keyboard,IRDispatcherDemo,ReceiveAndSend,IRsendProntoDemo,IRsendRawDemo,IRUnitTest,LGAirConditionerSendDemo,MicroGirs,MinimalReceiver,SimpleSender # no sending yet, no tone()
132
-
131
+
sketches-exclude: IR2Keyboard,IRDispatcherDemo,MicroGirs,MinimalReceiver # no tone()
132
+
build-properties: # the flags were put in compiler.cpp.extra_flags
133
+
All: -DUSE_SOFT_SEND_PWM
133
134
134
135
# Do not cancel all jobs / architectures if one job fails
This is a quite old but maybe useful wiki for this library.
32
32
33
+
# Converting your program to the 3.1 version
34
+
This must be done also for all versions > 3.0.1 if `USE_NO_SEND_PWM` is defined.<br/>
35
+
Starting with this version, the generation of PWM is done by software, thus saving the hardware timer and enabling abitrary output pins.<br/>
36
+
Therefore you must change all `IrSender.begin(true);` by `IrSender.begin(IR_SEND_PIN, true);`.
37
+
For cores like MegaCore where you can choose between enabling or disabling lto, lto must be enabled, otherwise you will get an assertion.
38
+
33
39
# Converting your 2.x program to the 3.x version
34
40
- Now there is an **IRreceiver** and **IRsender** object like the well known Arduino **Serial** object.
35
41
- Just remove the line `IRrecv IrReceiver(IR_RECEIVE_PIN);` and/or `IRsend IrSender;` in your program, and replace all occurrences of `IRrecv.` or `irrecv.` with `IrReceiver`.
@@ -78,13 +84,32 @@ If you do not know which protocol your IR transmitter uses, you have several cho
78
84
- To **increase strength of sent output signal** you can increase the current through the send diode, and/or use 2 diodes in series,
79
85
since one IR diode requires only 1.5 volt.
80
86
87
+
# Examples
88
+
### SimpleReceiver + SimpleSender
89
+
This examples are a good starting point.
90
+
91
+
### IRReceiveDemo + IRSendDemo
92
+
More complete examples for the advanced user.
93
+
94
+
### ReceiveAndSend
95
+
Like the name states...
96
+
97
+
### MinimalReceiver + SmallReceiver
98
+
If code size matters look at these examples.
99
+
100
+
### DispatcherDemo
101
+
Framework for calling different functions for different IR codes.
102
+
103
+
### IRrelay
104
+
Control a relay (connected to an output pin) with your remote.
105
+
81
106
# Compile options / macros for this library
82
107
To customize the library to different requirements, there are some compile options / macros available.<br/>
83
108
Modify it by commenting them out or in, or change the values if applicable. Or define the macro with the -D compiler option for global compile (the latter is not possible with the Arduino IDE, so consider using [Sloeber](https://eclipse.baeyens.it).
84
109
85
110
| Name | File | Default value | Description |
86
111
|-|-|-|-|
87
-
|`SEND_PWM_BY_TIMER`| Before `#include <IRremote.h>`| disabled | Disable carrier PWM generation in software and use (restricted) hardware PWM. |
112
+
|`SEND_PWM_BY_TIMER`| Before `#include <IRremote.h>`| disabled | Disable carrier PWM generation in software and use (restricted) hardware PWM ecxept for ESP32 where both modes are using the flexible `hw_timer_t`. |
88
113
|`USE_OLD_DECODE`| IRremoteInt.h | disabled | Enables the old decoder in order to be version 2.x compatible, where all protocols were MSB first. |
89
114
|`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. |
90
115
|`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. |
@@ -99,8 +124,6 @@ Modify it by commenting them out or in, or change the values if applicable. Or d
99
124
|`IR_FEEDBACK_LED_PIN`| TinyIRReceiver.h |`LED_BUILTIN`| The pin number for TinyIRReceiver feedback LED, which gets compiled in. |
100
125
|`DO_NOT_USE_FEEDBACK_LED`| TinyIRReceiver.h | disabled | Enable it to disable the feedback LED function. |
101
126
102
-
103
-
104
127
### Modifying compile options with Arduino IDE
105
128
First use *Sketch > Show Sketch Folder (Ctrl+K)*.<br/>
106
129
If you did not yet stored the example as your own sketch, then you are instantly in the right library folder.<br/>
Copy file name to clipboardExpand all lines: examples/ReceiveAndSend/ReceiveAndSend.ino
-4Lines changed: 0 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -83,11 +83,7 @@ void setup() {
83
83
84
84
IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK); // Start the receiver, enable feedback LED, take LED feedback pin from the internal boards definition
0 commit comments