Irremoteesp8266: Irremote does not work at 160MHz

Created on 5 Jun 2019  路  11Comments  路  Source: crankyoldgit/IRremoteESP8266

Hi,
using irremote latest on a D1 Mini and a or shield from lolin

Irremote works perfectly when D1 Mini runs at 80mhz but signal appears to be really "weak" when D1 Mini runs at 160MHz.

Please fix and congrats for the good work guys

help wanted

Most helpful comment

FYI, The changes mentioned above have been include in v2.6.1 of this library, which has just been released.

All 11 comments

Have you tried using the calibrate() function?
e.g. Before you start transmitting for the first time after instantiating the IRsend object add:

irsend.calibrate();

The default calibration (if not run) is typically fine for an ESP8266 running at 80MHz.
I have no experience running the ESP8266 at 160Mhz. Care to share some minimal example code so I can reproduce your problem?

If the calibrate(); works for you, please let us know what value it returns so we can add it to the code.

Alternatively, can you please try the code in this branch? https://github.com/markszabo/IRremoteESP8266/tree/periodoffset_at_cpufreq

I ran a ESP8266 at 160Mhz and calculated the offset required at that freq.

I also tested a D1 Mini running at @ 160Mhz using PR #729 and without, but using the calibrate() function. It correctly controlled real IR devices using signals it generated.

Thus this issue is effectively closed but I'll leave it open until the PR is merged.

I will check as soon as I can if calibrate() will solve my 160MHz issues.
I will update the issue. thanks

Based on your other Issue, I assume it went okay?

@crankyoldgit I'm using 80MHz now. Too many problems to solve first. Can I use calibrate() even when not using rawdata? For example with samsung.h?

calibrate() tunes any IRsend object/instance to have the internal timing offsets for the current given hardware. So, yes. Just call it once per instance, and after that, every thing else should use the correct timings for your hardware from then on. e.g. Put it in your setup() routine.

After PR #729 is merged, you shouldn't need it, as the default should change based on the clock frequency defined in F_CPU

After PR #729 is merged, you shouldn't need it, as the default should change based on the clock frequency defined in F_CPU

when will we see the update in the public repository?
I use platformio to download the libraries

Probably in less than a week.

You can add a custom environment in your project's platformio.ini file, or modify your existing one by adding something like the follow to use a specific branch:

[env:whatever_youwant]
platform=espressif8266
framework=arduino
board=d1_mini
lib_deps =
  https://github.com/markszabo/IRremoteESP8266.git#periodoffset_at_cpufreq

See https://docs.platformio.org/en/latest/projectconf/section_env_library.html#lib-deps

thanks!!!

FYI, The changes mentioned above have been include in v2.6.1 of this library, which has just been released.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlhavens picture jlhavens  路  7Comments

ayavilevich picture ayavilevich  路  7Comments

MehranMazhar picture MehranMazhar  路  5Comments

NewUser9 picture NewUser9  路  6Comments

saikhurana picture saikhurana  路  5Comments