Hei, this is real neat and i am part way building it now, but i am having an issue. How is the encoder suppose to be wired? I have used them before, stand alone, but not as a part of the button matrix. Could you clarify which pins on the encoder you refer to in the diagram. GND, VCC, Switch, DT and CLK. Thank you in advance!
@ElectricFjord its been a minute since i put this together, so i haven't thought about it in a while but - on the encoders i have there are two pins on one side and three on the other. the side with 2 pins is the button (momentary switch) - that wires into the 2nd row of the keyboard matrix; just as if it was one of the key switches. On the side with 3 pins, the center is GND and goes to a ground pin on the controller. The other two pins are the encoder directional pins, one pin for turning it clockwise, and the other counterclockwise. Those two pins each go to their own pin on the controller board. the diagram shows the exact locations for the Arduino (you'll have to look at the raw code in the zip files for other controllers - but i can help if you tell me which one). The OLED screen wires to the another GND, the VCC power pin (i think that spot may be 500ma 5v) and the two pins shown for communication of the screen are D1 and D0 in the board diagram (they drive the clock and signal for the screen). If that helps let me know - if not I'll dig into that diagram and see if i can make it clearer. (edited)
@revere521 Thank you. With your explanation it makes sense. I google various encoder pinout and it seems you have a stand alone version while mine is on a pcb where two of the pins and put together for ease of connection, but i do not think it will work for this setup, so i will just remove it from the pcb. The OLED is pretty straight forward, but thanks for sharing :)
@ElectricFjord ahh, OK- yes I hadn't considered that - probably the ground pins are combined into one - but de-soldering it from the mini PCB will probably make it fit better. There may also be tiny resistors on the board that the diagram doesn't take into account.
@revere521 Thanks for all the answer got the keyboard working with your precompiled code. I am not able to compile your code. It is unedited and running the newest version of QMK.
@ElectricFjord Glad its working! QMK has frequent development, so its hard to say what has changed over the last year or so. I may find some time this fall to go back and see what needs to be updated. You may be able to take the raw files in the zip and see what it would take to update the configs and make it custom for your application. Let me know how you make out! Otherwise, i'll see if i can get it updated so it at least doesn't fail to compile on the current QMK. The OLED screen support for some of the controllers was tricky in the first place, so that doesn't surprise me too much.
With the software, i can probably figure it out myself and get it working, so no stress. Just wanted to let you know :) I'll post a make once i am happy with the keyboard layout and color :)
@revere521 Hei, so i manage to update it and get a sucessful compile. The OLED driver was just that the syntax now is lower case, there were also some other issues to get it to compile. The problem i have now, which i cant seem to get around is that if i change the "MCU =" in the rules.mk to the device i am using(micro pro) i flags an error in keymap.c . I assume i am doing something wrong. What did you have to change to compile it for the micro pro?
@revere521 This is a mess of a message, tell me if i can give it to you in a better way
i changed
# MCU name MCU = STM32F303 BOARD = QMK_PROTON_C BOOTLOADER = stm32-dfu changed to MCU = atmega32u4 BOOTLOADER = caterina
and got In file included from quantum/keymap_introspection.c:5: ./keyboards/revere521/ultipadmk2proton/keymaps/default/keymap.c: In function 'oled_task_kb': ./keyboards/revere521/ultipadmk2proton/keymaps/default/keymap.c:114:3: error: implicit declaration of function 'snprintf' [-Werror=implicit-function-declaration] snprintf(led_buf, sizeof(led_buf) - 1, "Mod:%2d Hue:%2d\nSat:%2d Val:%2d", ^~~~~~~~
but to get anything to compile i had to comment out #include "config_common.h"
Compiling: keyboards/revere521/ultipadmk2proton/ultipadmk2proton.c In file included from <command-line>: ./keyboards/revere521/ultipadmk2proton/config.h:19:10: fatal error: config_common.h: No such file or directory #include "config_common.h"
@ElectricFjord there should be an "ultipadmk2promicro" version of the files, that should already be setup for the atmega32u4. The version setup for the proton uses an arm based chibios that has a slightly different configuration. I am having trouble getting my local qmk running properly, to test. There still may be an issue with the configs in both versions just because of updates since i first wrote it...but i will still try to get it to compile this weekend.
@revere521 Thank you. I really appreciate the project it is real neat! A tips is they have changed the name of the screen from using capitcal letters to use lowercase and similar things which caused the intial compilation error.
Are you saying that i should just rename those 2 micropro files to their equivalent default file names to change between version? if so, i could try some more. I just got stuck and was at a loose, hence i quit.
@ElectricFjord Sorry its been difficult to customize, but i think we can get you going. In the revere521.zip - unzip that folder into the local qmk Keyboards folder. There should be a "ultipadmk2promico" folder for the atmega leonardo/pro micro controlled, and an "ultipadmk2proton" for the proton arm based controller. You should be able to use the ultipadmk2promico without changing the controller in the rules.mk, but just changing what you need in the layouts.
In the screencapture, and the other item you posted it looks like you are using the folder and files for the proton, which would just be the wrong one for your purpose.
The oled driver issue shouldn't be a problem (using lowercase - thx for the tip) in the one for the promicro. But the files in general may need to be updated to match the current changes (since last year when i first compiled it).
If you have \qmk_firmware\keyboards\revere521\ultipadmk2proton, delete it and use \qmk_firmware\keyboards\revere521\ultipadmk2promicro instead, and it should get you closer to a working compiled firmware.
@revere521 I think you were right that was my initial mistake? If the promicro folder was there i feel stupid, but i am now stuck at the same point. I upda As i am pretty sure i manage to do all the correct changes to the proton setup. Now i get: ./keyboards/revere521/ultipadmk2promicro/config.h:19:10: fatal error: config_common.h: No such file or directory #include "config_common.h"
Commenting this out just causes other errors regarding keybindings and i cannot find this file anywhere.
Errors caused when commenting out the include: from quantum/keymap_introspection.c:5: ./keyboards/revere521/ultipadmk2promicro/keymaps/default/keymap.c:29:3: error: 'KC_NLCK' undeclared here (not in a function); did you mean 'KC_SLCT'? KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_MUTE, ^~~~~~~ keyboards/revere521/ultipadmk2promicro/ultipadmk2promicro.h:37:4: note: in definition of macro 'LAYOUT' { K10, K11, K12, K13, K14, KC_NO }, \ ^~~ ./keyboards/revere521/ultipadmk2promicro/keymaps/default/keymap.c:41:24: error: 'RESET' undeclared here (not in a function); did you mean 'RTSEN'? LCAG(KC_0), KC_TRNS, RESET, KC_TRNS, KC_TRNS), ^~~~~ (edited)
@ElectricFjord yes, now its a matter of updating my local files to see why its doing that... I'm still messing with it, but I'm hoping i can figure out why QMK is doing that later today. Its not something you are doing, its something that changed in QMK.
@revere521 Hei, with the info that i am not wrong I went ahead and manage to fix it. I could upload the fixed version somewhere if you want. or i can tell you the lines that needs to be fixed? The fix was quiet simple. (edited)
Hei, this is real neat and i am part way building it now, but i am having an issue. How is the encoder suppose to be wired? I have used them before, stand alone, but not as a part of the button matrix. Could you clarify which pins on the encoder you refer to in the diagram. GND, VCC, Switch, DT and CLK. Thank you in advance!
@ElectricFjord its been a minute since i put this together, so i haven't thought about it in a while but - on the encoders i have there are two pins on one side and three on the other. the side with 2 pins is the button (momentary switch) - that wires into the 2nd row of the keyboard matrix; just as if it was one of the key switches. On the side with 3 pins, the center is GND and goes to a ground pin on the controller. The other two pins are the encoder directional pins, one pin for turning it clockwise, and the other counterclockwise. Those two pins each go to their own pin on the controller board. the diagram shows the exact locations for the Arduino (you'll have to look at the raw code in the zip files for other controllers - but i can help if you tell me which one). The OLED screen wires to the another GND, the VCC power pin (i think that spot may be 500ma 5v) and the two pins shown for communication of the screen are D1 and D0 in the board diagram (they drive the clock and signal for the screen). If that helps let me know - if not I'll dig into that diagram and see if i can make it clearer. (edited)
@revere521 Thank you. With your explanation it makes sense. I google various encoder pinout and it seems you have a stand alone version while mine is on a pcb where two of the pins and put together for ease of connection, but i do not think it will work for this setup, so i will just remove it from the pcb. The OLED is pretty straight forward, but thanks for sharing :)
@ElectricFjord ahh, OK- yes I hadn't considered that - probably the ground pins are combined into one - but de-soldering it from the mini PCB will probably make it fit better. There may also be tiny resistors on the board that the diagram doesn't take into account.
@revere521 Thanks for all the answer got the keyboard working with your precompiled code. I am not able to compile your code. It is unedited and running the newest version of QMK.
@ElectricFjord Glad its working! QMK has frequent development, so its hard to say what has changed over the last year or so. I may find some time this fall to go back and see what needs to be updated. You may be able to take the raw files in the zip and see what it would take to update the configs and make it custom for your application. Let me know how you make out! Otherwise, i'll see if i can get it updated so it at least doesn't fail to compile on the current QMK. The OLED screen support for some of the controllers was tricky in the first place, so that doesn't surprise me too much.
@revere521 Yeah it is real nice, only thing from making it perfect is a PCB, but that's a lot of effort for you. This keyboard is a perfect combo with another open source keyboard i have https://github.com/mattdibi/redox-keyboard/tree/master.
With the software, i can probably figure it out myself and get it working, so no stress. Just wanted to let you know :) I'll post a make once i am happy with the keyboard layout and color :)
@revere521 Hei, so i manage to update it and get a sucessful compile. The OLED driver was just that the syntax now is lower case, there were also some other issues to get it to compile. The problem i have now, which i cant seem to get around is that if i change the "MCU =" in the rules.mk to the device i am using(micro pro) i flags an error in keymap.c . I assume i am doing something wrong. What did you have to change to compile it for the micro pro?
@ElectricFjord Its going to take me a minute to remember if i had to do anything special...whats the exact compile error?
@revere521
This is a mess of a message, tell me if i can give it to you in a better way
i changed
# MCU name
MCU = STM32F303
BOARD = QMK_PROTON_C
BOOTLOADER = stm32-dfu
changed to
MCU = atmega32u4
BOOTLOADER = caterina
and got
In file included from quantum/keymap_introspection.c:5:
./keyboards/revere521/ultipadmk2proton/keymaps/default/keymap.c: In function 'oled_task_kb':
./keyboards/revere521/ultipadmk2proton/keymaps/default/keymap.c:114:3: error: implicit declaration of function 'snprintf' [-Werror=implicit-function-declaration]
snprintf(led_buf, sizeof(led_buf) - 1, "Mod:%2d Hue:%2d\nSat:%2d Val:%2d",
^~~~~~~~
but to get anything to compile i had to comment out #include "config_common.h"
Compiling: keyboards/revere521/ultipadmk2proton/ultipadmk2proton.c In file included from <command-line>:
./keyboards/revere521/ultipadmk2proton/config.h:19:10: fatal error: config_common.h: No such file or directory
#include "config_common.h"
@ElectricFjord there should be an "ultipadmk2promicro" version of the files, that should already be setup for the atmega32u4. The version setup for the proton uses an arm based chibios that has a slightly different configuration. I am having trouble getting my local qmk running properly, to test. There still may be an issue with the configs in both versions just because of updates since i first wrote it...but i will still try to get it to compile this weekend.
@revere521 Thank you. I really appreciate the project it is real neat! A tips is they have changed the name of the screen from using capitcal letters to use lowercase and similar things which caused the intial compilation error.
Are you saying that i should just rename those 2 micropro files to their equivalent default file names to change between version? if so, i could try some more. I just got stuck and was at a loose, hence i quit.
@ElectricFjord Sorry its been difficult to customize, but i think we can get you going. In the revere521.zip - unzip that folder into the local qmk Keyboards folder. There should be a "ultipadmk2promico" folder for the atmega leonardo/pro micro controlled, and an "ultipadmk2proton" for the proton arm based controller. You should be able to use the ultipadmk2promico without changing the controller in the rules.mk, but just changing what you need in the layouts.
In the screencapture, and the other item you posted it looks like you are using the folder and files for the proton, which would just be the wrong one for your purpose.
The oled driver issue shouldn't be a problem (using lowercase - thx for the tip) in the one for the promicro. But the files in general may need to be updated to match the current changes (since last year when i first compiled it).
If you have \qmk_firmware\keyboards\revere521\ultipadmk2proton, delete it and use \qmk_firmware\keyboards\revere521\ultipadmk2promicro instead, and it should get you closer to a working compiled firmware.
@revere521 I think you were right that was my initial mistake? If the promicro folder was there i feel stupid, but i am now stuck at the same point. I upda As i am pretty sure i manage to do all the correct changes to the proton setup.
Now i get:
./keyboards/revere521/ultipadmk2promicro/config.h:19:10: fatal error: config_common.h: No such file or directory
#include "config_common.h"
Commenting this out just causes other errors regarding keybindings and i cannot find this file anywhere.
Errors caused when commenting out the include:
from quantum/keymap_introspection.c:5:
./keyboards/revere521/ultipadmk2promicro/keymaps/default/keymap.c:29:3: error: 'KC_NLCK' undeclared here (not in a function); did you mean 'KC_SLCT'?
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_MUTE,
^~~~~~~
keyboards/revere521/ultipadmk2promicro/ultipadmk2promicro.h:37:4: note: in definition of macro 'LAYOUT'
{ K10, K11, K12, K13, K14, KC_NO }, \
^~~
./keyboards/revere521/ultipadmk2promicro/keymaps/default/keymap.c:41:24: error: 'RESET' undeclared here (not in a function); did you mean 'RTSEN'?
LCAG(KC_0), KC_TRNS, RESET, KC_TRNS, KC_TRNS),
^~~~~ (edited)
@ElectricFjord yes, now its a matter of updating my local files to see why its doing that... I'm still messing with it, but I'm hoping i can figure out why QMK is doing that later today. Its not something you are doing, its something that changed in QMK.
@revere521 Hei, with the info that i am not wrong I went ahead and manage to fix it. I could upload the fixed version somewhere if you want. or i can tell you the lines that needs to be fixed? The fix was quiet simple. (edited)
@ElectricFjord What ended up being the fix?
@revere521
Commented out in config.h
#include "config_common.h"
#define UNUSED_PINS
All the "USB Device descriptor parameter "
Add the "USB Device descriptor parameter " to the info.JSON file
"manufacturer": "revere521",
"usb": {
"vid": "0xFEED",
"pid": "0x6060",
"device_version": "1.0.0"
}
renamed these buttons
KC_NLCK -> KC_NUM
RESET -> QK_BOOT
@ElectricFjord Excellent!! i'm glad you got it working. I will try that later today, and see if i can upload corrected code too - thank-you!