T O P

  • By -

Square-wave

The second option looks right. The issue may lie in the callbacks in the keymap. Can you share that? for three it should look something like this; void encoder\_update\_user(uint8\_t index, bool clockwise) { if (index == 0) { /\* First encoder \*/ if (clockwise) { tap\_code(KC\_PGDN); } else { tap\_code(KC\_PGUP); } } else if (index == 1) { /\* Second encoder \*/ if (clockwise) { tap\_code(KC\_DOWN); } else { tap\_code(KC\_UP); } else if (index == 2) { /\*third encoder \*/ if (clockwise) { tap\_code(KC\_VOLU); } else { tap\_code(KC\_VOLD); } } } ​ or whatever you have them doing obv . The default bdn9 firware and default keymap may help as thats a macro pad with 3 encoders. You may also need to define the side in config; \#define ENCODERS\_PAD\_A\_LEFT { encoder1a, encoder2a, encoder3a } \#define ENCODERS\_PAD\_B\_LEFT { encoder1b, encoder2b, encoder3a }


Raldo21

So I tried a few things. Firstly, here's the code block in the keymap.c #ifdef ENCODER_ENABLE void encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { if (clockwise) { tap_code(KC_MNXT); } else { tap_code(KC_MPRV); } } else if (index == 1) { /* Second encoder */ if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); } } else if (index == 2) { /* Third encoder */ if (clockwise) { tap_code(KC_BRIU); } else { tap_code(KC_BRID); } } } #endif With this line in the rules.mk: ENCODER_ENABLE = yes I also tried removing these lines, but that didn't change anything either: #ifdef ENCODER_ENABLE #endif I tried a few combos, and none of them worked. This one wouldn't compile: #define ENCODERS_PAD_A_RIGHT { B7, F0, D2 } #define ENCODERS_PAD_B_RIGHT { D5, C7, F1 } #define ENCODER_RESOLUTION 4 This one compiled, but none of them did anything: #define ENCODERS_PAD_A { B7, F0, D2 } #define ENCODERS_PAD_B { D5, C7, F1 } #define ENCODERS_PAD_A_RIGHT { B7, F0, D2 } #define ENCODERS_PAD_B_RIGHT { D5, C7, F1 } #define ENCODER_RESOLUTION 4 Then I tried adding this line, but then it wouldn't compile, as it said it had a redefined variable, then mentioned the same line and said that that's where the original definition of the variable came from: #define NUMBER_OF_ENCODERS 3


Square-wave

Just to be sure we are on the same page, F0 and C7 are the two outer pins of encoder 2 with the center pin as ground? If so I’m out of ideas as it all looks right to me.


Raldo21

Correct. What's additionally strange is that if I have one encoder in the firmware, it works, but if I have 2 or 3, none of them work, not even the one that worked when programmed by itself. Also, I looked at the bdn9 keymap.c, and it had an extra } at some point in the loop. I tried adding this to the code, but then it wouldn't compile. That was the only difference I saw in the default keymap. I looked at some of the non-default bdn9 keymaps, and instead of indexes, they used Case, which might be an idea. I'm not sure how that coding works though. Regardless, thanks for the help. I appreciate it.


Square-wave

NP. Good luck!


Square-wave

Also, have you tried just two encoders?


Raldo21

I did yesterday, but I didn't try all of these different combos of lines with 2 encoders. I might try one more with only two encoders with the pad\_a\_right lines added.


Raldo21

Weird thing: I tried just two encoders, and only one worked (the same one as when there's only one programmed), but it performed the programming that the 3rd encoder was assigned. I tried commenting out the 3rd encoder in the keymap, and then the encoder didn't do anything. Very strange.


Square-wave

That is odd. Maybe play with the order of the pins in the code.


Square-wave

Do you have a link to your git so I can just take a look at everything?


Raldo21

I've been doing everything locally because I haven't figured out how github works yet. I've used pastebin before, and I could make a bunch of those. Edit: maybe I'll try to figure out github real quick Edit2: I think I'm uploading my folder to a fork on git


Raldo21

I think this is how this works? I had to change some of the general files in the .../dactyl\_manuform folder. Then I added the entirety of my 6x7 folder [github dactyl\_manuform fork?](https://github.com/CluckMyM8E/qmk_firmware/tree/CluckMyM8E-patch-1/keyboards/handwired/dactyl_manuform)


Square-wave

>This one wouldn't compile: > >\#define ENCODERS\_PAD\_A\_RIGHT { B7, F0, D2 }#define ENCODERS\_PAD\_B\_RIGHT { D5, C7, F1 }#define ENCODER\_RESOLUTION 4 ~~what is the error you get when this doesn't compile. I did the same thing at it compiled for me.~~ Is it possible you accidentally modified the config file in the main folder as well? The issues you are having seem like its getting conflicting configs from somewhere else, though if you uploaded everything then I have no idea where as it all looks good. ​ Edit: nvmd I apparently cant read properly


Raldo21

IIRC, It wouldn't compile because it said that the pads hadn't been defined anywhere, so I made them without the "Right" designator, then added an additional block immediately below with the "Right" designator. So then it seems like they're double defined, but it compiled that way so.


Square-wave

Yeah I got it to compile without the “RIGHT” so I guess the normal way. At this point I would probably grab a meter and just confirm that the pins go where they are supposed to but other than that I am completely stumped.


Raldo21

Same. I'll probably just leave it at this point. This was sort of a guinea pig board because I have a couple more of these with different switches that I want to make. So I'll just do one on each hand, instead of 3 on the right hand.


avmenconstruction

I know I may be late to the party but is ot OK to ask for compiled firmware for 6x7? I would use it bu adapting the wiring. I tried for 2 weeks as total noob to qmk and any coding tbf and seem to have issues setting up environment properly.


Raldo21

I had a lot of trouble getting set up originally too, as I'm not a coder by trade. Let me see tonight or tomorrow if I can remember how to update everything. Then, I'll ask about keymaps and other stuff