IR 38Khz frequency out
IR 38Khz frequency out
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.
Paul Mulvey
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: IR 38Khz frequency out
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.
The Pyboard should cope easily.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: IR 38Khz frequency out
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
Platformio code example here:
https://github.com/hotplot/BlastIR/blob ... r_send.cpp
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: IR 38Khz frequency out
Clever I'd go with that solution.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: IR 38Khz frequency out
Arduino code for esp8266:
https://github.com/markszabo/IRremoteESP8266
Tested with wemos d1 mini. It works!
https://github.com/markszabo/IRremoteESP8266
Tested with wemos d1 mini. It works!
Re: IR 38Khz frequency out
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