mirror of
https://github.com/Theaninova/Arduino-IRremote.git
synced 2025-12-29 17:52:49 +00:00
Compare commits
13 Commits
revert-425
...
merge-pr-5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc13f66296 | ||
|
|
7cad31cbb1 | ||
|
|
bdb9f1c1f5 | ||
|
|
71f6daca4f | ||
|
|
2b3188e40a | ||
|
|
d719c27f95 | ||
|
|
20a4d97f61 | ||
|
|
1154607b69 | ||
|
|
47aadf559d | ||
|
|
eb7a0bee7d | ||
|
|
18f12d3aff | ||
|
|
f0aa48a4d1 | ||
|
|
691ea5bc53 |
@@ -3,7 +3,6 @@ These are the active contributors of this project that you may contact if there
|
||||
|
||||
- [z3t0](https://github.com/z3t0) : Active Contributor and currently also the main contributor.
|
||||
* Email: zetoslab@gmail.com
|
||||
* Skype: polarised16
|
||||
- [shirriff](https://github.com/shirriff) : An amazing person who worked to create this awesome library and provide unending support
|
||||
- [AnalysIR](https:/github.com/AnalysIR): Active contributor and is amazing with providing support!
|
||||
- [Informatic](https://github.com/Informatic) : Active contributor
|
||||
|
||||
@@ -270,6 +270,7 @@ class IRsend
|
||||
//......................................................................
|
||||
# if SEND_RC5
|
||||
void sendRC5 (unsigned long data, int nbits) ;
|
||||
void sendRC5ext (unsigned long addr, unsigned long cmd, boolean toggle);
|
||||
# endif
|
||||
# if SEND_RC6
|
||||
void sendRC6 (unsigned long data, int nbits) ;
|
||||
|
||||
17
README.md
17
README.md
@@ -8,7 +8,7 @@ This library enables you to send and receive using infra-red signals on an Ardui
|
||||
|
||||
Tutorials and more information will be made available on [the official homepage](http://z3t0.github.io/Arduino-IRremote/).
|
||||
|
||||
## Version - 2.2.3
|
||||
## Version - 2.4.3
|
||||
|
||||
## Installation
|
||||
1. Navigate to the [Releases](https://github.com/z3t0/Arduino-IRremote/releases) page.
|
||||
@@ -17,6 +17,12 @@ Tutorials and more information will be made available on [the official homepage]
|
||||
4. Move the "IRremote" folder that has been extracted to your libraries directory.
|
||||
5. Make sure to delete Arduino_Root/libraries/RobotIRremote. Where Arduino_Root refers to the install directory of Arduino. The library RobotIRremote has similar definitions to IRremote and causes errors.
|
||||
|
||||
|
||||
## FAQ
|
||||
- IR does not work right when I use Neopixels (aka WS2811/WS2812/WS2812B)
|
||||
Whether you use the Adafruit Neopixel lib, or FastLED, interrupts get disabled on many lower end CPUs like the basic arduinos. In turn, this stops the IR interrupt handler from running when it needs to. There are some solutions to this on some processors, [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)
|
||||
|
||||
|
||||
## Supported Boards
|
||||
- Arduino Uno / Mega / Leonardo / Duemilanove / Diecimila / LilyPad / Mini / Fio / Nano etc.
|
||||
- Teensy 1.0 / 1.0++ / 2.0 / 2++ / 3.0 / 3.1 / Teensy-LC; Credits: @PaulStoffregen (Teensy Team)
|
||||
@@ -26,6 +32,7 @@ Tutorials and more information will be made available on [the official homepage]
|
||||
- ATmega64, 128
|
||||
- ATtiny 84 / 85
|
||||
- ESP32 (receive only)
|
||||
- ESP8266 is supported in a fork based on an old codebase that isn't as recent, but it works reasonably well given that perfectly timed sub millisecond interrupts are different on that chip. See https://github.com/markszabo/IRremoteESP8266
|
||||
|
||||
We are open to suggestions for adding support to new boards, however we highly recommend you contact your supplier first and ask them to provide support from their side.
|
||||
|
||||
@@ -36,7 +43,7 @@ We are open to suggestions for adding support to new boards, however we highly r
|
||||
| [ATtiny84](https://github.com/SpenceKonde/ATTinyCore) | **6** | **1** |
|
||||
| [ATtiny85](https://github.com/SpenceKonde/ATTinyCore) | **1** | **TINY0** |
|
||||
| [ATmega8](https://github.com/MCUdude/MiniCore) | **9** | **1** |
|
||||
| Atmega32u4 | 5, 9, **13** | 1, 3, **4** |
|
||||
| Atmega32u4 | 5, **9**, 13 | 1, 3, **4** |
|
||||
| [ATmega48, ATmega88, ATmega168, ATmega328](https://github.com/MCUdude/MiniCore) | **3**, 9 | 1, **2** |
|
||||
| [ATmega1284](https://github.com/MCUdude/MightyCore) | 13, 14, 6 | 1, **2**, 3 |
|
||||
| [ATmega164, ATmega324, ATmega644](https://github.com/MCUdude/MightyCore) | 13, **14** | 1, **2** |
|
||||
@@ -50,6 +57,12 @@ We are open to suggestions for adding support to new boards, however we highly r
|
||||
| [Teensy 3.0 / 3.1](https://www.pjrc.com/teensy/) | **5** | **CMT** |
|
||||
| [Teensy-LC](https://www.pjrc.com/teensy/) | **16** | **TPM1** |
|
||||
|
||||
|
||||
### Experimental patches
|
||||
The following are strictly community supported patches that have yet to make it into mainstream. If you have issues feel free to ask here. If it works well then let us know!
|
||||
|
||||
[Arduino 101](https://github.com/z3t0/Arduino-IRremote/pull/481#issuecomment-311243146)
|
||||
|
||||
The table above lists the currently supported timers and corresponding send pins, many of these can have additional pins opened up and we are open to requests if a need arises for other pins.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -85,8 +85,8 @@
|
||||
// Teensy 2.0
|
||||
#elif defined(__AVR_ATmega32U4__)
|
||||
//#define IR_USE_TIMER1 // tx = pin 14
|
||||
//#define IR_USE_TIMER3 // tx = pin 9
|
||||
#define IR_USE_TIMER4_HS // tx = pin 10
|
||||
#define IR_USE_TIMER3 // tx = pin 9
|
||||
//#define IR_USE_TIMER4_HS // tx = pin 10
|
||||
|
||||
// Teensy 3.0 / Teensy 3.1
|
||||
#elif defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
## 2.4.3
|
||||
- Added Philips Extended RC-5 protocol support [PR #522] (https://github.com/z3t0/Arduino-IRremote/pull/522)
|
||||
|
||||
## 2.3.3 - 2017/03/31
|
||||
- Added ESP32 IR receive support [PR #427](https://github.com/z3t0/Arduino-IRremote/pull/425)
|
||||
|
||||
|
||||
@@ -78,6 +78,73 @@ void IRsend::sendRC5 (unsigned long data, int nbits)
|
||||
|
||||
space(0); // Always end with the LED off
|
||||
}
|
||||
|
||||
void IRsend::sendRC5ext (unsigned long addr, unsigned long cmd, boolean toggle)
|
||||
{
|
||||
// Set IR carrier frequency
|
||||
enableIROut(36);
|
||||
|
||||
unsigned long addressBits = 5;
|
||||
unsigned long commandBits = 7;
|
||||
unsigned long nbits = addressBits + commandBits;
|
||||
|
||||
// Start
|
||||
mark(RC5_T1);
|
||||
|
||||
// Bit #6 of the command part, but inverted!
|
||||
unsigned long cmdBit6 = (1UL << (commandBits-1)) & cmd;
|
||||
if (cmdBit6) {
|
||||
// Inverted (1 -> 0 = mark-to-space)
|
||||
mark(RC5_T1);
|
||||
space(RC5_T1);
|
||||
} else {
|
||||
space(RC5_T1);
|
||||
mark(RC5_T1);
|
||||
}
|
||||
commandBits--;
|
||||
|
||||
// Toggle bit
|
||||
static int toggleBit = 1;
|
||||
if (toggle) {
|
||||
if (toggleBit == 0) {
|
||||
toggleBit = 1;
|
||||
} else {
|
||||
toggleBit = 0;
|
||||
}
|
||||
}
|
||||
if (toggleBit) {
|
||||
space(RC5_T1);
|
||||
mark(RC5_T1);
|
||||
} else {
|
||||
mark(RC5_T1);
|
||||
space(RC5_T1);
|
||||
}
|
||||
|
||||
// Address
|
||||
for (unsigned long mask = 1UL << (addressBits - 1); mask; mask >>= 1) {
|
||||
if (addr & mask) {
|
||||
space(RC5_T1); // 1 is space, then mark
|
||||
mark(RC5_T1);
|
||||
} else {
|
||||
mark(RC5_T1);
|
||||
space(RC5_T1);
|
||||
}
|
||||
}
|
||||
|
||||
// Command
|
||||
for (unsigned long mask = 1UL << (commandBits - 1); mask; mask >>= 1) {
|
||||
if (cmd & mask) {
|
||||
space(RC5_T1); // 1 is space, then mark
|
||||
mark(RC5_T1);
|
||||
} else {
|
||||
mark(RC5_T1);
|
||||
space(RC5_T1);
|
||||
}
|
||||
}
|
||||
|
||||
space(0); // Always end with the LED off
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//+=============================================================================
|
||||
|
||||
Reference in New Issue
Block a user