Hi I just picked up three rotary encoders from adafruit and they are unresponsive with the nkrkv/encoder node. The node deploys but the counters don’t move when handling the encoder. Has anyone else had this issue lately? Could it be these particular encoders? All my pins are set up properly so im not sure what the issue could be.
Hmm… They should. The library is made specifically for this kind of encoders. Are you sure your wiring is correct? Do you see digital port value switching if use a pair of simple xod/gpio/digital-read?
Thanks for your response! Checked the wiring and seems ok. Digital read pins both say “false” and don’t switch when I rotate the encoder. Oddly, I can get the encoder working in one direction with the escape-ford / encoder ky040 node. Very strange!
I think your encoder needs pull-up resistors.
in the example of arduino the pull-ups are configured, but in XOD they are not implemented, you can put external resistors or modify the code C++
void setup()
{
// set pins as input with internal pull-up resistors enabled
pinMode(PIN_ENCODER_A, INPUT_PULLUP);
pinMode(PIN_ENCODER_B, INPUT_PULLUP);
pinMode(PIN_ENCODER_SWITCH, INPUT_PULLUP);