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

Bob #10

Open
idoze1952 opened this issue Oct 7, 2022 · 3 comments
Open

Bob #10

idoze1952 opened this issue Oct 7, 2022 · 3 comments

Comments

@idoze1952
Copy link

Hello John,
First, Encoder.h is brilliant!, but I have an issue.

I have 9 encoders in my project. I have tested all encoders one by one, they all work correctly with Encoder.h.
I can take any 4 of the encoders in any order (i.e. 1,2,3 & 4 | 3,5,7 & 9 | 1.5.7 & 9) and they work as expected!

However as soon as I increase the number of encoders in the Array to 5 or more, (it compiles OK) but goes into the void loop and never gets out - its a show stopper.

I am reluctant to submit this but I am never going to correct this issue by myself and it may benefit other people.

Thank You
Bob Telfer

@John-Lluch
Copy link
Owner

Thanks for your feedback.

I don't fully understand what you mean by "go to the void loop". Do you mean the execution appears to go frozen, or unresponsible?

I can think on a possible cause for that, but I have not checked myself. My theory is that the interrupt handle code may be taking too long to complete so the interrupts are interrupting themselves, thus possibly causing all sort of weirdness.
If that's the case, then this should be solved by reducing the interrupt frequency.

To do so just set INTERRUPT_PERIOD to a bigger value in the encoder.h file. The default is 25, which is extremely short for most needs. Try to set it to 50 or 133 as per the comments in the .h file.

@idoze1952
Copy link
Author

idoze1952 commented Oct 7, 2022 via email

@John-Lluch
Copy link
Owner

No problem @idoze1952, I already appreciate your feedback. Have a nice day

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

2 participants