Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Doio KB04 #22754

Merged
merged 12 commits into from
Feb 1, 2024
111 changes: 111 additions & 0 deletions keyboards/doio/kb04/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"manufacturer": "DOIO",
"keyboard_name": "KB04-01",
"maintainer": "filmstarr",
"bootloader": "stm32duino",
"build": {
"lto": true
},
"diode_direction": "COL2ROW",
adophoxia marked this conversation as resolved.
Show resolved Hide resolved
"encoder": {
"rotary": [
{"pin_a": "B5", "pin_b": "B6"}
]
},
"features": {
"bootmagic": true,
"command": false,
"console": false,
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": false,
"rgb_matrix": true
},
"matrix_pins": {
"cols": ["B14", "B13", "B12", "B0", "A7"],
"rows": ["B3"]
},
"processor": "STM32F103",
"rgb_matrix": {
"animations": {
"solid_color": true,
drashna marked this conversation as resolved.
Show resolved Hide resolved
"alphas_mods": true,
"gradient_up_down": true,
"gradient_left_right": true,
"breathing": true,
"band_sat": true,
"band_val": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"rainbow_moving_chevron": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"dual_beacon": true,
"rainbow_beacon": true,
"rainbow_pinwheels": true,
"raindrops": true,
"jellybean_raindrops": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"pixel_fractal": true,
"pixel_flow": true,
"pixel_rain": true,
"typing_heatmap": true,
"digital_rain": true,
"solid_reactive_simple": true,
"solid_reactive": true,
"solid_reactive_wide": true,
"solid_reactive_multiwide": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_nexus": true,
"solid_reactive_multinexus": true,
"splash": true,
"multisplash": true,
"solid_splash": true,
"solid_multisplash": true
},
"driver": "ws2812",
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
{"matrix": [0, 1], "x": 75, "y": 0, "flags": 1},
{"matrix": [0, 2], "x": 149, "y": 0, "flags": 1},
{"matrix": [0, 3], "x": 224, "y": 0, "flags": 1},
{"matrix": [0, 4], "x": 112, "y": 64, "flags": 1},
{"matrix": [0, 5], "x": 112, "y": 64, "flags": 1},
{"matrix": [0, 6], "x": 112, "y": 64, "flags": 1},
{"matrix": [0, 7], "x": 112, "y": 64, "flags": 1}
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
],
"max_brightness": 200,
"sleep": true
},
"url": "https://www.keebmonkey.com/products/megalodon-macro-pad-with-a-knob",
"usb": {
"device_version": "0.0.1",
"pid": "0x0401",
"vid": "0xD010"
},
"ws2812": {
"pin": "A10"
},
"layouts": {
"LAYOUT": {
"layout": [
{"label": "1!", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "2@", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "3#", "matrix": [0, 2], "x": 2, "y": 0},
{"label": "4$", "matrix": [0, 3], "x": 3, "y": 0},
{"label": "Encoder", "matrix": [0, 4], "x": 1.5, "y": 1}
]
}
}
}
48 changes: 48 additions & 0 deletions keyboards/doio/kb04/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* Copyright 2022 filmstarr <https://github.com/filmstarr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H

enum layer_names {
_LAY0,
_LAY1
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
L0:
┌───┬───┬───┬───┐ ┌───┐
│MO1│Prv│Ply│Nxt│ │Mut│
└───┴───┴───┴───┘ └───┘
L1:
┌───┬───┬───┬───┐ ┌───┐
│ │Hud│Tog│Mod│ │ │
└───┴───┴───┴───┘ └───┘
*/
[_LAY0] = LAYOUT(
MO(_LAY1), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE
),
[_LAY1] = LAYOUT(
KC_TRNS, RGB_HUD, RGB_TOG, RGB_MOD, KC_TRNS
)
};

#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_LAY0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_LAY1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
};
#endif
1 change: 1 addition & 0 deletions keyboards/doio/kb04/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes
48 changes: 48 additions & 0 deletions keyboards/doio/kb04/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* Copyright 2022 filmstarr <https://github.com/filmstarr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H

enum layer_names {
_LAY0,
_LAY1
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
L0:
┌───┬───┬───┬───┐ ┌───┐
│MO1│Prv│Ply│Nxt│ │Mut│
└───┴───┴───┴───┘ └───┘
L1:
┌───┬───┬───┬───┐ ┌───┐
│ │Hud│Tog│Mod│ │ │
└───┴───┴───┴───┘ └───┘
*/
[_LAY0] = LAYOUT(
MO(_LAY1), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE
),
[_LAY1] = LAYOUT(
KC_TRNS, RGB_HUD, RGB_TOG, RGB_MOD, KC_TRNS
)
};

#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_LAY0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_LAY1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
};
#endif
2 changes: 2 additions & 0 deletions keyboards/doio/kb04/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE = yes
ENCODER_MAP_ENABLE = yes
27 changes: 27 additions & 0 deletions keyboards/doio/kb04/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# doio/kb04

![doio/kb04](https://i.imgur.com/lqABZw4h.png)

A macropad that have 4-key keyboard made by DOIO, which controlled by an APM32F103CBT6 chipset. The keyboard features per-key RGB and 1 encoder.

* Keyboard Maintainer: [filmstarr](https://github.com/filmstarr)
* Hardware Supported: DOIO Knob Board - KB04
* Hardware Availability: [keebmonkey.com](https://www.keebmonkey.com/products/megalodon-macro-pad-with-a-knob)

Make example for this keyboard (after setting up your build environment):

qmk compile -kb doio/kb04 -km default

Flashing example for this keyboard:

qmk flash -kb doio/kb04 -km default

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

## Bootloader

Enter the bootloader in 3 ways:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (1! key) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
1 change: 1 addition & 0 deletions keyboards/doio/kb04/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file intentionally left blank