Newb here, with a basic encoder that is not being read consistently. Sometimes it takes 1 click and sometimes up to 4 clicks to get encoder.h to print to serial monitor. NO extra caps or resistors on encoder.
encoder.h library, Straight connection to Teensey 4.0 pins 7, 8
Note I don't see in the docs how to pull the Teensey pins high w/encoder.
Basic stock test s/w is:
#include <Encoder.h>
Encoder myEnc(7, 8);
// avoid using pins with LEDs attached
SOLVED: replace encoder, now it works (no extra pullups added, am using PJRC Encoder lib).
Sorry to bother everyone.
----FYI there is conflict w/the declaring the encoder direction and joystick.button. Don't declare enc direction and all works fine).