aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrT1ddl3s <60518619+mrT1ddl3s@users.noreply.github.com>2021-01-24 23:25:50 -0700
committerGitHub <noreply@github.com>2021-01-24 22:25:50 -0800
commitbd5d3c879ef1bc019776d6736be76f98c12dd0fd (patch)
tree042e378209a22c37a9c591743ca0ee7fcfbf3269
parentc1e1166991579066672c73a42ce21f8d23d96f4c (diff)
downloadqmk_firmware-bd5d3c879ef1bc019776d6736be76f98c12dd0fd.tar.gz
qmk_firmware-bd5d3c879ef1bc019776d6736be76f98c12dd0fd.zip
[Keyboard] Knobgoblin keyboard initial commit (#11664)
* Knobgoblin keyboard initial commit New macropad initial commit. Keyboard and keymap * corrected bracket and layout name * attempting info file fix again * info file line 33 hanging comma fix * Update keyboards/knobgoblin/config.h per fauxpark review Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/knobgoblin/readme.md per fauxpark review Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/knobgoblin/readme.md per fauxpark review Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--keyboards/knobgoblin/config.h45
-rw-r--r--keyboards/knobgoblin/info.json37
-rw-r--r--keyboards/knobgoblin/keymaps/ortho/keymap.c108
-rw-r--r--keyboards/knobgoblin/keymaps/ortho/readme.md8
-rw-r--r--keyboards/knobgoblin/knobgoblin.c17
-rw-r--r--keyboards/knobgoblin/knobgoblin.h32
-rw-r--r--keyboards/knobgoblin/readme.md15
-rw-r--r--keyboards/knobgoblin/rules.mk25
8 files changed, 287 insertions, 0 deletions
diff --git a/keyboards/knobgoblin/config.h b/keyboards/knobgoblin/config.h
new file mode 100644
index 000000000..bee6056a0
--- /dev/null
+++ b/keyboards/knobgoblin/config.h
@@ -0,0 +1,45 @@
1/* Copyright 2020 MrT1ddl3s
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0xFEED
23#define PRODUCT_ID 0x0000
24#define DEVICE_VER 0x0001
25#define MANUFACTURER MrT1ddl3s
26#define PRODUCT knobgoblin
27
28/* key matrix size */
29#define MATRIX_ROWS 5
30#define MATRIX_COLS 5
31
32/* key matrix pins */
33#define MATRIX_ROW_PINS { D4, B6, B2, B3, B1 }
34#define MATRIX_COL_PINS { B5, B4, E6, D7, C6 }
35#define UNUSED_PINS
36
37#define ENCODERS_PAD_A { F7, F5 }
38#define ENCODERS_PAD_B { F6, F4 }
39
40#define OLED_TIMEOUT 180000
41
42/* COL2ROW or ROW2COL */
43#define DIODE_DIRECTION COL2ROW
44
45#define DEBOUNCE 2
diff --git a/keyboards/knobgoblin/info.json b/keyboards/knobgoblin/info.json
new file mode 100644
index 000000000..b2da3efb3
--- /dev/null
+++ b/keyboards/knobgoblin/info.json
@@ -0,0 +1,37 @@
1{
2 "keyboard_name": "knobgoblin",
3 "url": "",
4 "maintainer": "MrT1ddl3s",
5 "width": 4,
6 "height": 5,
7 "layouts": {
8 "LAYOUT": {
9 "layout_ortho": [
10 {"x": 1, "y": 0},
11 {"x": 2, "y": 0},
12 {"x": 3, "y": 0},
13 {"x": 4, "y": 0},
14
15 {"x": 1, "y": 1},
16 {"x": 2, "y": 1},
17 {"x": 3, "y": 1},
18 {"x": 4, "y": 1},
19
20 {"x": 1, "y": 2},
21 {"x": 2, "y": 2},
22 {"x": 3, "y": 2},
23 {"x": 4, "y": 2},
24
25 {"x": 1, "y": 3},
26 {"x": 2, "y": 3},
27 {"x": 3, "y": 3},
28 {"x": 4, "y": 3},
29
30 {"x": 1, "y": 4},
31 {"x": 2, "y": 4},
32 {"x": 3, "y": 4},
33 {"x": 4, "y": 4}
34 ]
35 }
36 }
37}
diff --git a/keyboards/knobgoblin/keymaps/ortho/keymap.c b/keyboards/knobgoblin/keymaps/ortho/keymap.c
new file mode 100644
index 000000000..d545904a5
--- /dev/null
+++ b/keyboards/knobgoblin/keymaps/ortho/keymap.c
@@ -0,0 +1,108 @@
1/* Copyright 2020 MrT1ddl3s
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21
22 [0] = LAYOUT_ortho(
23 KC_EQL, KC_PSLS, KC_PAST, KC_PMNS,
24 KC_P7, KC_P8, KC_P9, KC_PPLS,
25 KC_P4, KC_P5, KC_P6, KC_PPLS,
26 KC_MPLY, KC_P1, KC_P2, KC_P3, KC_PENT,
27 KC_MUTE, MO(1), KC_P0, KC_PDOT, KC_PENT
28 ),
29
30 [1] = LAYOUT_ortho(
31 KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS,
32 KC_HOME, KC_TRNS, KC_PGUP, KC_TRNS,
33 KC_END , KC_UP, KC_PGDN, KC_TRNS,
34 KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_SPC,
35 KC_TRNS, KC_TRNS, KC_BSPC, KC_DEL, KC_TRNS
36 )
37};
38
39/* assign keycodes to the encoder rotation */
40void encoder_update_user(uint8_t index, bool clockwise) {
41
42 if (index == 1) { /* Bottom encoder */
43 if (clockwise) {
44 tap_code(KC_VOLU);
45 } else {
46 tap_code(KC_VOLD);
47 }
48 }
49 if (index == 0) { /* Top encoder */
50 if (clockwise) {
51 tap_code(KC_MNXT);
52 } else {
53 tap_code(KC_MPRV);
54 }
55 }
56}
57#ifdef OLED_DRIVER_ENABLE
58/* rotate screen for proper orentation*/
59oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
60
61/* byte map for the goblin logo, knob goblin text, and level text */
62static void render_logo(void) {
63 static const char PROGMEM my_logo[] = {
64 0x00, 0xe0, 0x40, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x08, 0x08, 0x08,
65 0x08, 0x08, 0x08, 0x10, 0x20, 0x60, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x40, 0xe0, 0x00,
66 0x00, 0x03, 0x06, 0x3c, 0x49, 0x91, 0x21, 0x00, 0x40, 0x80, 0x80, 0x80, 0x80, 0x00, 0x60, 0x00,
67 0x00, 0x60, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x00, 0x21, 0x91, 0x49, 0x3c, 0x06, 0x03, 0x00,
68 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1f, 0x60, 0x40, 0xc0, 0x06, 0x0e, 0x0f, 0x67, 0x50, 0xc0,
69 0xc0, 0x50, 0x67, 0x0f, 0x0e, 0x06, 0xc0, 0x40, 0x60, 0x1f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
70 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x7b, 0xc7, 0x8e, 0x1e, 0x3e, 0x3e,
71 0x3e, 0x3e, 0x1e, 0x8e, 0xc7, 0x7b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
72 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x04,
73 0x04, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
74 0x03, 0x03, 0x03, 0x03, 0x03, 0x83, 0x03, 0x03, 0x03, 0x83, 0x03, 0x83, 0x03, 0x03, 0x03, 0x83,
75 0x03, 0x03, 0x83, 0x83, 0x83, 0x03, 0x03, 0x83, 0x83, 0x83, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
76 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x04, 0x06, 0x09, 0x10, 0x00, 0x1f, 0x03, 0x06, 0x0c, 0x1f,
77 0x00, 0x0f, 0x10, 0x10, 0x10, 0x0f, 0x00, 0x1f, 0x12, 0x12, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00,
78 0x00, 0x78, 0xfc, 0x84, 0xa4, 0xa4, 0x68, 0x00, 0x78, 0x84, 0x84, 0x84, 0x78, 0x00, 0xfc, 0x94,
79 0x94, 0x68, 0x00, 0xfc, 0x80, 0x80, 0x80, 0x00, 0xfc, 0x00, 0xfc, 0x18, 0x30, 0x60, 0xfc, 0x00,
80 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
81 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
82 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x50, 0x50, 0x50, 0x00, 0xf0, 0x00, 0x00,
83 0x00, 0xf0, 0x00, 0xf0, 0x50, 0x50, 0x50, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
84 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
85 0x01, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00
86
87 };
88 oled_write_raw_P(my_logo, sizeof(my_logo));
89}
90
91/* text display for layer indication */
92void oled_task_user(void) {
93
94 render_logo();
95 oled_set_cursor(0,11);
96 oled_advance_char();
97 switch (get_highest_layer(layer_state)) {
98 case 0:
99 oled_write_P(PSTR("ONE\n"), false);
100 break;
101 case 1:
102 oled_write_P(PSTR("TWO\n"), false);
103 break;
104 }
105
106}
107#endif
108
diff --git a/keyboards/knobgoblin/keymaps/ortho/readme.md b/keyboards/knobgoblin/keymaps/ortho/readme.md
new file mode 100644
index 000000000..9a37b43c6
--- /dev/null
+++ b/keyboards/knobgoblin/keymaps/ortho/readme.md
@@ -0,0 +1,8 @@
1# KNOBGOBLIN
2
3![Knob Goblin](https://i.imgur.com/JCmj4Is.jpg)
4
5# Ortho Knob Goblin Layout
6
7This is the ortho layout for the Knob Goblin. key assignments to be used as a standard numpad layout
8with a layer momentary switch in the bottom left \ No newline at end of file
diff --git a/keyboards/knobgoblin/knobgoblin.c b/keyboards/knobgoblin/knobgoblin.c
new file mode 100644
index 000000000..f82c0178a
--- /dev/null
+++ b/keyboards/knobgoblin/knobgoblin.c
@@ -0,0 +1,17 @@
1/* Copyright 2020 MrT1ddl3s
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "knobgoblin.h"
diff --git a/keyboards/knobgoblin/knobgoblin.h b/keyboards/knobgoblin/knobgoblin.h
new file mode 100644
index 000000000..b5b2cf7e5
--- /dev/null
+++ b/keyboards/knobgoblin/knobgoblin.h
@@ -0,0 +1,32 @@
1/* Copyright 2020 MrT1ddl3s
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18#include "quantum.h"
19
20#define LAYOUT_ortho( \
21 K01, K02, K03, K04, \
22 K11, K12, K13, K14, \
23 K21, K22, K23, K24, \
24 K30, K31, K32, K33, K34, \
25 K40, K41, K42, K43, K44 \
26) { \
27 { KC_NO, K01, K02, K03, K04 }, \
28 { KC_NO, K11, K12, K13, K14 }, \
29 { KC_NO, K21, K22, K23, K24 }, \
30 { K30, K31, K32, K33, K34 }, \
31 { K40, K41, K42, K43, K44 } \
32}
diff --git a/keyboards/knobgoblin/readme.md b/keyboards/knobgoblin/readme.md
new file mode 100644
index 000000000..20ebc92e9
--- /dev/null
+++ b/keyboards/knobgoblin/readme.md
@@ -0,0 +1,15 @@
1# KNOBGOBLIN
2
3![Knob Goblin](https://i.imgur.com/oYnzqqNl.jpg)
4
5A 5x4 numpad with 2x rotary encoder and OLED support.
6
7* Keyboard Maintainer: [MrT1ddl3s](https://github.com/mrT1ddl3s)
8* Hardware Supported: knobgoblin PCB
9* Hardware Availability: Occasional group buy.[knobgoblin.xyz](https://knobgoblin.xyz)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make knobgoblin:default
14
15See 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).
diff --git a/keyboards/knobgoblin/rules.mk b/keyboards/knobgoblin/rules.mk
new file mode 100644
index 000000000..d1c86defb
--- /dev/null
+++ b/keyboards/knobgoblin/rules.mk
@@ -0,0 +1,25 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = caterina
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = no # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = yes # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = yes # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23
24ENCODER_ENABLE = yes
25OLED_DRIVER_ENABLE = yes