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
Implemented feedback for send. Removed decode_results results. Added unit test and fixed LG send bug. MATCH_MARK() etc. now available as matchMark(). Added PinDefinitionsAndMore.h.
sketches-exclude: IR2Keyboard,IRUnitTest,IRrelay,ReceiveAndSend,IRreceiveDump,IRsendProntoDemo,MicroGirs,IRDispatcherDemo,LGAirConditionerSendDemo,ReceiverTimingAnalysis # Does not fit in FLASH or RAM, missing digitalPinToInterrupt
107
+
sketches-exclude: IR2Keyboard,UnitTest,ControlRelay,ReceiveAndSend,ReceiveDump,SendProntoDemo,MicroGirs,IRDispatcherDemo,SendLGAirConditionerDemo,ReceiverTimingAnalysis # Does not fit in FLASH or RAM, missing digitalPinToInterrupt
108
108
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
113
+
sketches-exclude: IR2Keyboard,UnitTest,ReceiveAndSend,ReceiveDump,SendProntoDemo,MicroGirs,IRDispatcherDemo,SendLGAirConditionerDemo,ReceiverTimingAnalysis # Does not fit in FLASH or RAM
114
114
build-properties: # the flags were put in compiler.cpp.extra_flags
Copy file name to clipboardExpand all lines: README.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,13 +32,13 @@ This is a quite old but maybe useful wiki for this library.
32
32
# Converting your program to the 3.1 version
33
33
This must be done also for all versions > 3.0.1 if `USE_NO_SEND_PWM` is defined.<br/>
34
34
Starting with this version, **the generation of PWM is done by software**, thus saving the hardware timer and **enabling abitrary output pins**.<br/>
35
-
Therefore you must change all `IrSender.begin(true);` by `IrSender.begin(IR_SEND_PIN, true);`.
35
+
Therefore you must change all `IrSender.begin(true);` by `IrSender.begin(IR_SEND_PIN, ENABLE_LED_FEEDBACK);`.
36
36
37
37
# Converting your 2.x program to the 3.x version
38
38
- Now there is an **IRreceiver** and **IRsender** object like the well known Arduino **Serial** object.
39
39
- 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`.
40
40
- Since the decoded values are now in `IrReceiver.decodedIRData` and not in `results` any more, remove the line `decode_results results` or similar.
41
-
- Like for the Serial object, call [`IrReceiver.begin(IR_RECEIVE_PIN, ENABE_ED_FEEDBACK);`](https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/examples/IRreceiveDemo/IRreceiveDemo.ino#L38) or `IrReceiver.begin(IR_RECEIVE_PIN, DISABLE_LED_FEEDBACK);` instead of the `IrReceiver.enableIRIn();` or `irrecv.enableIRIn();` in setup().
41
+
- Like for the Serial object, call [`IrReceiver.begin(IR_RECEIVE_PIN, ENABE_ED_FEEDBACK);`](https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/examples/ReceiveDemo/ReceiveDemo.ino#L38) or `IrReceiver.begin(IR_RECEIVE_PIN, DISABLE_LED_FEEDBACK);` instead of the `IrReceiver.enableIRIn();` or `irrecv.enableIRIn();` in setup().
42
42
- Old `decode(decode_results *aResults)` function is replaced by simple `decode()`. So if you have a statement `if(irrecv.decode(&results))` replace it with `if (IrReceiver.decode())`.
43
43
- The decoded result is now in in `IrReceiver.decodedIRData` and not in `results` any more, therefore replace any occurrences of `results.value` and / or `results.decode_type` (and similar) to `IrReceiver.decodedIRData.decodedRawData` and / or `IrReceiver.decodedIRData.decodedRawData`.
44
44
- Overflow, Repeat and other flags are now in [`IrReceiver.receivedIRData.flags`](https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/src/IRremote.h#L126).
@@ -69,8 +69,8 @@ The main reason is, that it was designed to fit inside MCUs with relatively low
69
69
70
70
## Hints
71
71
If you do not know which protocol your IR transmitter uses, you have several choices.
72
-
- Use the [IRreceiveDump example](examples/IRreceiveDump) to dump out the IR timing.
73
-
You can then reproduce/send this timing with the [IRsendRawDemo example](examples/IRsendRawDemo).
72
+
- Use the [IRreceiveDump example](examples/ReceiveDump) to dump out the IR timing.
73
+
You can then reproduce/send this timing with the [SendRawDemo example](examples/SendRawDemo).
74
74
For **long codes** with more than 48 bits like from air conditioners, you can **change the length of the input buffer** in [IRremote.h](src/IRremoteInt.h#L36).
75
75
- The [IRMP AllProtocol example](https://github.com/ukw100/IRMP#allprotocol-example) prints the protocol and data for one of the **40 supported protocols**.
76
76
The same library can be used to send this codes.
@@ -86,7 +86,7 @@ If you do not know which protocol your IR transmitter uses, you have several cho
86
86
### SimpleReceiver + SimpleSender
87
87
This examples are a good starting point.
88
88
89
-
### IRReceiveDemo + IRSendDemo
89
+
### ReceiveDemo + SendDemo
90
90
More complete examples for the advanced user.
91
91
92
92
### ReceiveAndSend
@@ -95,7 +95,7 @@ Like the name states...
95
95
### MinimalReceiver + SmallReceiver
96
96
If code size matters look at these examples.
97
97
98
-
### DispatcherDemo
98
+
### IRDispatcherDemo
99
99
Framework for calling different functions for different IR codes.
100
100
101
101
### IRrelay
@@ -113,11 +113,12 @@ Modify it by commenting them out or in, or change the values if applicable. Or d
113
113
|`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. |
114
114
|`USE_NO_SEND_PWM`| Before `#include <IRremote.h>`| disabled | Use no carrier PWM, just simulate an active low receiver signal. |
115
115
|`FEEDBACK_LED_IS_ACTIVE_LOW`| Before `#include <IRremote.h>`| disabled | Required on some boards (like my BluePill and my ESP8266 board), where the feedback LED is active low. |
116
+
|`DISABLE_LED_FEEDBACK_FOR_RECEIVE`| Before `#include <IRremote.h>`| disabled | This disables the LED feedback code for receive, thus saving around 108 bytes program space and halving the receiver ISR processing time. |
116
117
|`IR_INPUT_IS_ACTIVE_HIGH`| IRremoteInt.h | disabled | Enable it if you use a RF receiver, which has an active HIGH output signal. |
117
118
|`RAW_BUFFER_LENGTH`| IRremoteint.h | 101 | Buffer size of raw input buffer. Must be odd! |
0 commit comments