Page 1 of 1

IR 38Khz frequency out

Posted: Wed Aug 15, 2018 9:05 am
by pmulvey
The Arduino (ATMega 328) has a timer register that can be preloaded and set to pulse an I/O pin on overflow so that a 38KHz output waveform is generated outside of program control. Has the ESP8266 anything like this? Bit banging with micropython is not fast enough I'm sure.

Re: IR 38Khz frequency out

Posted: Wed Aug 15, 2018 9:19 am
by pythoncoder
I have doubts whether the ESP8266 could do this as it's prone to latency issues and the frequency needs to be quite stable. But you could experiment.

The Pyboard should cope easily.

Re: IR 38Khz frequency out

Posted: Wed Aug 15, 2018 11:44 am
by mcauser
I haven’t tried it but hotplot on github says you can generate a 38 kHz signal in hardware by configuring the MTMS pin as the I2S clock signal and setting the frequency appropriately.

Platformio code example here:
https://github.com/hotplot/BlastIR/blob ... r_send.cpp

Re: IR 38Khz frequency out

Posted: Thu Aug 16, 2018 8:16 am
by pythoncoder
Clever ;) I'd go with that solution.

Re: IR 38Khz frequency out

Posted: Thu Aug 16, 2018 11:08 am
by pmulvey
Has anyone implemented this method in micropython?

Re: IR 38Khz frequency out

Posted: Thu Mar 28, 2019 7:41 pm
by Zolee
Arduino code for esp8266:
https://github.com/markszabo/IRremoteESP8266
Tested with wemos d1 mini. It works!

Re: IR 38Khz frequency out

Posted: Mon Sep 02, 2019 4:16 pm
by Pottiepie
Yes the Arduino libraries works with my NodeMCU. Has it been ported to Micropython? This is the only thing stopping from me from switching over as I need IR to control my fan and aircon