ESP32 (Pulse) Counter capability

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
elschopi
Posts: 16
Joined: Tue May 12, 2020 5:12 am
Location: Bavaria, Germany

ESP32 (Pulse) Counter capability

Post by elschopi » Wed May 05, 2021 7:27 am

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)


wangshujun@tom.com
Posts: 61
Joined: Fri Feb 15, 2019 9:22 am

Re: ESP32 (Pulse) Counter capability

Post by wangshujun@tom.com » Fri May 21, 2021 8:56 am

Look forward to the integration of this feature

Post Reply