Encoder library velocity sense and debounce

Status
Not open for further replies.

ilium007

Well-known member
Hi - I have a few questions about the included encoder library. Is there and encoder debounce included . Do I need to worry about the encoder bouncing on state changes ? Also, if I wanted to implement velocity sense and I’m using the library with interrupt pins do I just let the library do it’s thing and then read the encoder count over time in the main loop and then change the stored value by a larger increment ?
 
I wouldn’t worry about trying to denounce encoders in software, it’s more like a rabbit hole, you’ll have much better results Debouncing in hardware and less headache. As for velocity, that’s what I recently did when experimenting with it, I reset the encoders value back to 0 after every time I read it and using this method of resetting it you can easily get acceleration depending on how far from 0 the encoder object reads when you turn it. Then it’s just a matter of determining how you want to accelerate it, you can keep it one to one or you can find an equation that feels natural to you, just experiment with a few things.
 
Status
Not open for further replies.
Back
Top