Hall sensor without interrupt#424
Conversation
|
I am in for merging this. for the v2.3.4! |
|
Hey @Candas1, Would you have time to add an exmaple code in the library examples folder of how to use this new |
|
Hi @askuric, It will just work by commenting enableinterrupt(). So it might not require an additional example, but I can add a comment there. Most important might be to explain in the docs when to use it. Looking at the folder you shared, I have one doubt. Is this still required ?
|
|
Ok cool! Yeah, I'd still keep the software interrupts for now, we can remove them in the future releases. I'm updating the docs at the moment. Would you agree with this statement? RULE OF THUMB: Hardware/Software or No interrupts?
|
|
Yes that's ok. We will get more feedback in the future as users experiment, so we can add more details later if needed. (fast vs slow hardware, fast vs slow motor, accuracy for velocity control, ....) |
This code will allow running a hall sensor without interrupt if the interrupts if enableinterrupts() is not used.
It will poll the hall sensor states during the sensor.update instead.
There are also small optimizations of the hall sensor updatestate code.
More details in this issue.