Page 1 of 1

ESP32 (Pulse) Counter capability

Posted: Wed May 05, 2021 7:27 am
by elschopi
Hello everyone,

I'm trying to DIY a wind sensor using a LM393 IR bridge sensor module. For that, I would like to read the pulses generated by the sensor with an ESP32.
The ESP32 should perform other measurements, too.
I'm trying to work with Pin.irq but having some (understanding) problems*.
First question:
While searching for solutions, I have found an archived micropython documentation talking about a hardware counter for ESP32, namely machine.Counter -> https://micropython-tve.readthedocs.io/ ... unter.html
This should have been available in version 1.12
However, I can't find it, neither in version 1.15 nor 1.12 (both IDF3 and IDF4 versions). Was it never implemented, or is there some esoteric special build of micropython out there? The machine.Counter seems to fit my requirements nicely :D
Second question:
As far as I understand, the ESP32 also has a special pulse counter (PCNT) implemented, but that function hasn't been ported to micropython (yet)?

*: I set up pins and variables, define a handler function and a summarizing function, but get type errors (but it doesn't tell me in which function)

Re: ESP32 (Pulse) Counter capability

Posted: Tue May 11, 2021 1:03 pm
by ihornehrutsa

Re: ESP32 (Pulse) Counter capability

Posted: Fri May 21, 2021 8:56 am
by wangshujun@tom.com
Look forward to the integration of this feature