Comments (4)
One example of wrong code:
The decoded IR code for SAMSUNG power is:
unsigned int rawData[67] = {4550,4450, 650,1650, 650,1650, 650,1650, 650,500, 650,500, 650,550, 650,550, 650,550, 650,1650, 650,1650, 650,1650, 650,550, 650,550, 650,550, 650,550, 650,500, 650,550, 650,1650, 650,500, 650,550, 650,500, 650,500, 650,550, 650,500, 650,1650, 650,550, 650,1600, 650,1650, 650,1650, 650,1600, 650,1600, 650,1650, 650}; // SAMSUNG E0E040BF
And the one from IRDB is:
unsigned int Samsung_power_toggle[71] = {38000,1,1,170,170,20,63,20,63,20,63,20,20,20,20,20,20,20,20,20,20,20,63,20,63,20,63,20,20,20,20,20,20,20,20,20,20,20,20,20,63,20,20,20,20,20,20,20,20,20,20,20,20,20,63,20,20,20,63,20,63,20,63,20,63,20,63,20,63,20,1798};
Both data and length are different and IRDB code is working fine.
from irremoteesp8266.
TL;DR: If you want to send Global Cache (IRDB) format, see https://github.com/markszabo/IRremoteESP8266/blob/master/examples/IRGCSendDemo/IRGCSendDemo.ino. The data in both is the same, however the timings are slightly different.
FYI, the rawData and IRDB(Global Cache) formats are different and not directly compatible.
e.g. there are 4 extra fields in the GC format, of freq, send count, repeat point and the amount of trailing space. (71 - 4 = 67)
Converting them to a rough binary format by hand:
rawData = Header + 11100000111000000100000010111111 (0xE0E040BF)
(A pair of [~650, ~1650] == 1, a pair of [~650, ~500] == 0)
irdb = Header + 11100000111000000100000010111111 (0xE0E040BF)
(A pair of [20, 63] == 1, a pair of [20, 20] == 0)
Thus the code values are the same.
Now the question of if the timings are same.
GC format uses the concept of 'period time' in it's format.
The period is calculated at: floor(1000/(38000/1000)) == 26
Converting the GC pairs above, you get
A pair of 20, 63 => 20*26, 63*26 == 520, 1638; and a pair of 20, 20 => 20*26, 20*26 == 520,520.
So it appears our timing for samsung appear to be off.
i.e.
#define SAMSUNG_BIT_MARK 590
#define SAMSUNG_ONE_SPACE 1690
#define SAMSUNG_ZERO_SPACE 590
The 1690 value is close enough to 1638/1650, that it should be fine-ish.
However the value of 590 is a bit off the GC value of 520, and 500/550 & 650 in the rawData.
Before we adjust that values, is the rawData value in your example captured from an actual Samsung remote? i.e. should we be trusting it. I have no idea on the provenance of the IRDB/Global Cache values.
If it is a Samsung remote, can you take multiple rawData samples of it so we can get more confidence what the average times are?
from irremoteesp8266.
ping.
from irremoteesp8266.
I've confirmed that the library when invoked with sendSamsung(0xE0E040BFUL, 32);
works as expected. i.e. It toggles power to a Samsung TV, the library also decodes it as the correct samsung code.
The raw data captured also matches what you reported.
I suspect you have a problem elsewhere with your other code, circuit, or environment.
Marking this closed.
from irremoteesp8266.
Related Issues (20)
- 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
- 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!
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.