Comments (1)
Well, right now it can not send it in HEX format, since (as you said) it uses a non-standard NEC protocol. But since you have the device, you may try to write the function for it, let's say sendNEC2.
Here is the sendNEC with comments:
void IRsend::sendNEC(unsigned long data, int nbits)
{
enableIROut(38); //it will use 38 kHz to module the signal. You can probably leave it
mark(NEC_HDR_MARK); //this sends a 'mark' in the length of NEC_HDR_MARK. Mark means turning on and off the IR led on 38 kHz
space(NEC_HDR_SPACE); //this sends a 'space' in the length of NEC_HDR_SPACE. Space means keeping the led turned off for that time.
for (int i = 0; i < nbits; i++) { //sending the signal
if (data & TOPBIT) {
mark(NEC_BIT_MARK);
space(NEC_ONE_SPACE);
}
else {
mark(NEC_BIT_MARK);
space(NEC_ZERO_SPACE);
}
data <<= 1;
}
mark(NEC_BIT_MARK);
space(0); //making sure the led is turned off in the end
}
As you can see the important part is the for loop with the algorithm and the timing constants: NEC_HDR_MARK, NEC_HDR_SPACE, NEC_BIT_MARK, NEC_ONE_SPACE, NEC_BIT_MARK, NEC_ZERO_SPACE. You can find these constants in IRremoteInt.h.
If I were you I would start figuring out the differences between your code and the standard NEC code, because if it is only about the length of the signal, then it's probably enough to change the for loop above. If you manage to make it work, don't forget to issue a pull request, so I can integrate it into the library :)
from irremoteesp8266.
Related Issues (20)
- The IT Receiver sensor (SM0038) is receiving signals and reporting values even when not pressing any button in the remote.
- Carrier AC 84bit HOT 2
- Does this library support for OnePlus TV , realme TV and Mi TV remote. HOT 1
- Problem with Zanussi A/C HOT 7
- IRHaierAC160 light toggle only working every 2nd time
- Unable to include C libraries HOT 3
- How to get or find CarrierAc 32 bit protocol? HOT 1
- Common AC Control - Swing turn on HOT 1
- Toshiba AC Remote Control B Support HOT 1
- Feature Request: De'Longhi Pinguino PAC N82 ECO IR Protocol HOT 5
- DAIKIN IRHVAC Off Issue. HOT 1
- The implementation and declaration of some functions differs from the function call HOT 4
- Coolix protocol "fan only mode" sends "dry mode" command instead HOT 1
- Support for Carrier RG56CMI-WRAC1 HOT 1
- Got error messages in Arduino IDE v3.0.1(ESP32C3) something like timerAlarm or void gpio_intr() HOT 1
- making a ir hub HOT 1
- FUNIKI AC remote (85 bits) need to be supported!
- Support for 'quiet' mode in COOLIX protocol
- Using any other mode than "Cool" causes AC to turn off. HOT 6
- Solution to AC remote giving different data for same button pressed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from irremoteesp8266.