Comments (6)
One more thing - when I am sending NEC codes to my TV from ESP it works fine, so it looks like code need some tweaks after porting, or aircon is very sensitive for every disruption (length of signal for zeros and ones).
---edit---
I will try one more thing today - as I/O pins on ESP8266 can deliver only 12mA of current, I'll try to power IR LED directly from 3V3 by using transistor. Maybe 12mA is not enough and some devices cannot capture signal from LED...
---edit---
Problem fixed - driving led thru transistor helped. It looks like 12mA directly from IO pin is not enough for my IR LED to be recognized by AC.
It also shows that other protocols can be ported directly by copying corresponding functions :)
from irremoteesp8266.
Well can you send the code from the Arduino? I think, maybe your LED has a slightly different frequency then the receiver of the airconditioner
from irremoteesp8266.
The same LED and the same code on oryginal arduino board and oryginal IR library works fine. I have no idea what is wrong.
from irremoteesp8266.
@direk Thank you for your tip.
from irremoteesp8266.
Hi!
this code work for me:
in IRremoteESP8266.cpp
...
void IRsend::sendNEC(unsigned long data, int nbits)
{
enableIROut(38);
mark(NEC_HDR_MARK);
space(NEC_HDR_SPACE);
for (int i = 0; i < nbits; i++) {
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);
}
void IRsend::sendLG (unsigned long data, int nbits)
{
enableIROut(38);
mark(LG_HDR_MARK);
space(LG_HDR_SPACE);
mark(LG_BIT_MARK);
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
space(LG_ONE_SPACE);
mark(LG_BIT_MARK);
} else {
space(LG_ZERO_SPACE);
mark(LG_BIT_MARK);
}
}
space(0);
}
void IRsend::sendWhynter(unsigned long data, int nbits) {
...
and off course in IRremoteESP8266.h
void sendNEC(unsigned long data, int nbits);
void sendLG(unsigned long data, int nbits);
void sendSony(unsigned long data, int nbits);
from irremoteesp8266.
Ok, thanks, I added your function. Next time you may issue a pull request, which would make my work easier and give you proper credits (but I still wrote your name in the commit message).
from irremoteesp8266.
Related Issues (20)
- Compile Error in ESP32 IDF when including IRemoteESP8266 as a component HOT 2
- DECODE_HASH should get its own protocol type HOT 9
- IRremoteESP8266 library compile error bk7231t HOT 2
- USB CDC must be enabled on ESP32S3 in order to receive infrared signals correctly. HOT 1
- Fails to detect Hitachi AC Remote. Sending raw data also does not work HOT 9
- Need help for Panasonic Remote Control N2QAYB000354
- 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
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.