Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 compiles but it is not accurate #64

Open
Mesihas opened this issue Dec 13, 2020 · 4 comments
Open

ESP32 compiles but it is not accurate #64

Mesihas opened this issue Dec 13, 2020 · 4 comments

Comments

@Mesihas
Copy link

Mesihas commented Dec 13, 2020

There is no point on posting this on EXPRESSIF.COM

For me compiles perfect. The problem is that for each encoder rotation (1 point) I get multiples values and most of the times is not clean in terms of sequential move like:

33
34
33
34
33
34
35
36

This represents 1 move... How can accurately get a proper and unified value for every rotation point ?

@danthegoodman1
Copy link

I have a similar issue, except no matter which direction I go I only get either 0 or 1:

0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0

@brunnwart
Copy link

My experience is that this lib cannot be used für esp32. It just "looses" many counts (using interrupts by taking into account the ISR_ATTR topic) and thus it is absolutely far from precise and therefore useless.
Unfortunately I haven't found a working alternative so far.

@jpswensen
Copy link

I was just looking at this today and I think I have a potential solution on the ESP32, but don't know how it would integrate well with this library. Using FreeRTOS (which is available in ArduinoIDE with the ESP32 core), you can designate a thread to run on a particular core.

As a quick first test, I plan on kicking off a single thread on the second core whos only responsibility is to poll the various GPIO set up for encoders. It seems like a waste of a whole core, but should be faster than interrupts.

@StefanL38
Copy link

With ESP32 or ESP8266 use NewEncoder from gfvalvo instead
https://github.com/gfvalvo/NewEncoder

best regards Stefan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants