SimHub icon indicating copy to clipboard operation
SimHub copied to clipboard

3rd,4th.....nth encoders not triggering on press CW and CCW for Arduino Pro Micro

Open djcomber opened this issue 2 years ago • 3 comments

Describe the bug I have a button box with matirx button configuration and 3 ec11 encoders. All buttons function. Have added encoder push buttons to matrix rather than stand alone settings in simhub.

First 2 encoders operate as expected. 3rd encoder functions only on output A (pin 2) registers, Output B (pin 3) does not register Swapping pins output A (Pin 3) output (pin2) again output A registers and ouput B does not. 4th Encoder does not register inputs at all on input A or input B..

Simhub version 8.2.1

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Arduino Setup-> Encoders'
  2. Select 'Arduino Pro Micro' as the board
  3. Enable 3 Encoders
  4. Add A and B pin outs for all 3 encoders,
  5. Using USB controller setup up in windows any settings from Encoder 3 Output B does not register.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image image image image image

Additional context It appears any pin assigned to 3rd encoder ouput B and below does not register when trigged. pins can be moved to any other encoder input and they register proving wiring is correct and Encoder is functioning as expected.

djcomber avatar Feb 20 '23 12:02 djcomber

Hi ! There are some pins not supporting all kind of inputs, unfortunately arduino documentation about those lacks is really low , I think you felt into those https://github.com/SHWotever/SimHub/wiki/Arduino---Button-matrix#wiring

SHWotever avatar Feb 25 '23 10:02 SHWotever

The pins are not the issue. As shown above I can put any of the pins with encoders on them into encoder 1 and 2 and they work fine. Any pins in encoder 3 output B and below do not register. Eg if I put pins 2,3 in encoder 1 outputs A,B it the encode wired to pins 2,3 work fine. Move pins 2,3 to encoder 3 outputs A,B in sim bun and only pin 2 will register an input. The only change was to the pin allocations in sim hub. So I don’t think I’ve wired up to a pin that doesn’t support the input.

I did suspect at the beginning that maybe I got unlucky and I tried rewiring the 3rd encoder pin 19 to other pins, same result no output from encoder 3 output B.

Then I swapped the pins allocation in sim hub and put the encoder 3 pins (4,19) on encoder 1 and put encoder 1 pins (2,3) on encoder 3. Only to find that Pin 3 that worked when allocated to encoder 1 no longer registered. And that pin 19 that didn’t work when allocated to encoder 3 output B now works fine when set to encoder 1 output B. I then iterated through each encoder pin allocation in sim hub and found that any pin set to encoder 3 B and after (Ie encoder 4,5 etc) didn’t register.

Have a closer look at the images attached and take note of the pin allocations. You’ll see what I mean. Encoders 1 and 2 worked fine with every combination. Encoder 3 only ever registered output A and encoder 4 never register either A or B.

djcomber avatar Feb 25 '23 13:02 djcomber

Oh and the button matrix works fine, super easy to config that’s to sim hub.

djcomber avatar Feb 25 '23 13:02 djcomber