Thanks pcbreflux provide code for arduino IDE: ESP32 IR Control How to use it: Setup: IRrecvInit(pin, port) pin: pin number of ESP32. port: chanel of remote control (0 - 7). Read IR code: IRrecvReadIR() Read IR code from remote.