I'm building a simple project using the ESP32 WeMos LOLIN32 board.
I was looking for a good library to be able to interface with an IR remote (the one which you can see here: https://www.circuitbasics.com/wp-conte ... trol-3.jpg)
The receiver that I'm using is this one:
I tried using this example library: https://github.com/husarnet/esp-idf/blo ... nec_main.c, however the issue is that it seems like
it is failing to perform the initial NEC handshake (see nec specification here: https://www.sbprojects.net/knowledge/ir ... 201.125ms.. It seems like the duration of when my remote is sending signal is different from the one specified:
Code: Select all
Data item num fine
Item: level0: 0, level1: 1, duration0: 7508, duration1: 3529
Nec item duration: 9385
Target duration duration: 9350 +- 400
Nec item duration: 4411
Target duration duration: 4500 +- 400
Nec header fine
Nec item duration: 683
Target duration duration: 560 +- 400
Nec item duration: 492
Target duration duration: 1690 +- 400
Nec item duration: 683
Target duration duration: 560 +- 400
Nec item duration: 492
Three questions:
-> Do you know if there is some preferred library for using IR remotes with esp-idf?
-> Could it be the case that my remote isn't using the NEC protocol but something else (e.g. Sony)?
-> Is it possible that the different durations are because of the 3.3V voltage of the microcontroller and it somehow messes up the calculation of the duration of the signal?
Thank you,
Szymon