Replies: 4 comments 3 replies
-
There are a few PR's outstanding for supporting counter and encoder functionality. And @jimmo mentioned that there is work going on to support it. The discussion is still about the API and for ESP32 the best way to support it. That said, I cannto tell how long it will take to have in in main line. Until then, you could build your own firmware based on the existing PRs for the ESP32 or MIMXRT platform. |
Beta Was this translation helpful? Give feedback.
-
You can count pulses in your sleep https://github.com/micropython/micropython-esp32-ulp if you want to |
Beta Was this translation helpful? Give feedback.
-
For a PR it is less important when it was made, but whether it is maintained and updated along the progress of the main branch. As long as this happens, it is recent. #8766 was updated 2 months ago. Maybe @IhorNehrutsa can update it now again. There is as well PR #12346 intended to replace #8766 and #7582, which is newer but seems to require maintenance by it's author @jimmo. I do not know if there will by any progress of this feature. Maybe it's going just to another hibernation period. |
Beta Was this translation helpful? Give feedback.
-
How fast, IRQ seems to work fine up to 10kHz in my tests.
|
Beta Was this translation helpful? Give feedback.
-
I want to count some pulses, and they might come more quickly than handling them in an interpreted language probably allows, so I'd like to use hardware. I'm curious if anyone ever counts pulses in micropython now, and if so how do they do it? I've seen some discussion on other hardware (using the PIO module with Pi Pico). While I know the ESP32 has a hardware module for this (PCNT) it seems there is no support for that yet in micropython, although it has been discussed at least since 2019, and separately a quadrature encoder since 2022. #5216 #8766
Beta Was this translation helpful? Give feedback.
All reactions