You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a rotatory encoder with pushbutton. I am using this library to read the values from the encoder. Each time I move the encoder one indent, 4 events get triggered advancing the counter by 4. Not sure if this is normal or my encoder is different than the usual expected behavior. I have tried adding #define ENC_DECODER (1 << 2) before including the .h file. I have also tried #define ENC_HALFSTEP with different values with 2 or 3 events getting triggered instead. When I set the 4th parameter of the constructor to 2, only 2 events get triggered but if I change it to the default of 1, 3 events get triggered.
Is there a problem with my encoder? Is there a way to ensure that only one event is triggered per encoder indent so that it only advances the position counter by 1 per indent?
Thanks for any help!
The text was updated successfully, but these errors were encountered:
Hi,
I had the same problem on my side and maybe could you fix it with stepsPerNotch in constructor as mentioned in doc :
Depending on the type of your encoder, you can define use the constructors parameter stepsPerNotch an set it to either 1, 2 or 4 steps per notch, with 1 being the default.
On my side with a Keyes encoder, I have to specify 4.
i just had to figure this out, as mine sent 2 per ident. The number of stepsPerNotch is defined as a 4th variable after the analog pins as below.. In this example it defines 2 steps per notch
I have a rotatory encoder with pushbutton. I am using this library to read the values from the encoder. Each time I move the encoder one indent, 4 events get triggered advancing the counter by 4. Not sure if this is normal or my encoder is different than the usual expected behavior. I have tried adding #define ENC_DECODER (1 << 2) before including the .h file. I have also tried #define ENC_HALFSTEP with different values with 2 or 3 events getting triggered instead. When I set the 4th parameter of the constructor to 2, only 2 events get triggered but if I change it to the default of 1, 3 events get triggered.
Is there a problem with my encoder? Is there a way to ensure that only one event is triggered per encoder indent so that it only advances the position counter by 1 per indent?
Thanks for any help!
The text was updated successfully, but these errors were encountered: