Hi everyone, thanks for sharing your knowledge with others.
I must say that was study a lot C++ and try and modificate many codes while many days, but i cant resolve it.
My question; I building a surface control midi,i was can working buttons and pots,but the encoders working with errors (ky-040),at rotate the encoder jump the values (0 to 60 to 90 to 127 for example, or others random values ) in the Daw (Reaper).
Reaper haves 4 modes to manage encoder/potentiometers; absolute, relative1, relative 2 and relative 3. In absolute mode (to potentiometers) encoder working fine but rotary encoders must works in relative modes.
This its a bounce´s issue? i guess the code its using “software debounce” or I must build a “hardware debounce” (with resistors and capacitors)?
I hope you can help me with that,its the only issue i must resolve it and finish my proyect.
Components & details.:
1-Arduino Mega 2560.
2-Encoders model ky-040.
4-Windows 7/10 x64(in both same errors).
5-Loopmidi and Hairless.
I add the .zip code, thanks a lot everyone.
code.zip (6.89 KB)