summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 0000000000..bee6056a02
--- /dev/null
+++ b/keyboards/knobgoblin/config.h
@@ -0,0 +1,45 @@
+/* Copyright 2020 MrT1ddl3s
+ *
+ * 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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0000
+#define DEVICE_VER 0x0001
+#define MANUFACTURER MrT1ddl3s
+#define PRODUCT knobgoblin
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 5
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D4, B6, B2, B3, B1 }
+#define MATRIX_COL_PINS { B5, B4, E6, D7, C6 }
+#define UNUSED_PINS
+
+#define ENCODERS_PAD_A { F7, F5 }
+#define ENCODERS_PAD_B { F6, F4 }
+
+#define OLED_TIMEOUT 180000
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+#define DEBOUNCE 2
diff --git a/keyboards/knobgoblin/info.json b/keyboards/knobgoblin/info.json
new file mode 100644
index 0000000000..b2da3efb38
--- /dev/null
+++ b/keyboards/knobgoblin/info.json
@@ -0,0 +1,37 @@
+{
+ "keyboard_name": "knobgoblin",
+ "url": "",
+ "maintainer": "MrT1ddl3s",
+ "width": 4,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "layout_ortho": [
+ {"x": 1, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+ {"x": 4, "y": 0},
+
+ {"x": 1, "y": 1},
+ {"x": 2, "y": 1},
+ {"x": 3, "y": 1},
+ {"x": 4, "y": 1},
+
+ {"x": 1, "y": 2},
+ {"x": 2, "y": 2},
+ {"x": 3, "y": 2},
+ {"x": 4, "y": 2},
+
+ {"x": 1, "y": 3},
+ {"x": 2, "y": 3},
+ {"x": 3, "y": 3},
+ {"x": 4, "y": 3},
+
+ {"x": 1, "y": 4},
+ {"x": 2, "y": 4},
+ {"x": 3, "y": 4},
+ {"x": 4, "y": 4}
+ ]
+ }
+ }
+}
diff --git a/keyboards/knobgoblin/keymaps/ortho/keymap.c b/keyboards/knobgoblin/keymaps/ortho/keymap.c
new file mode 100644
index 0000000000..d545904a53
--- /dev/null
+++ b/keyboards/knobgoblin/keymaps/ortho/keymap.c
@@ -0,0 +1,108 @@
+/* Copyright 2020 MrT1ddl3s
+ *
+ * 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
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT_ortho(
+ KC_EQL, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_MPLY, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_MUTE, MO(1), KC_P0, KC_PDOT, KC_PENT
+ ),
+
+ [1] = LAYOUT_ortho(
+ KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_HOME, KC_TRNS, KC_PGUP, KC_TRNS,
+ KC_END , KC_UP, KC_PGDN, KC_TRNS,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_SPC,
+ KC_TRNS, KC_TRNS, KC_BSPC, KC_DEL, KC_TRNS
+ )
+};
+
+/* assign keycodes to the encoder rotation */
+void encoder_update_user(uint8_t index, bool clockwise) {
+
+ if (index == 1) { /* Bottom encoder */
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ }
+ if (index == 0) { /* Top encoder */
+ if (clockwise) {
+ tap_code(KC_MNXT);
+ } else {
+ tap_code(KC_MPRV);
+ }
+ }
+}
+#ifdef OLED_DRIVER_ENABLE
+/* rotate screen for proper orentation*/
+oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
+
+/* byte map for the goblin logo, knob goblin text, and level text */
+static void render_logo(void) {
+ static const char PROGMEM my_logo[] = {
+ 0x00, 0xe0, 0x40, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x08, 0x08, 0x08,
+ 0x08, 0x08, 0x08, 0x10, 0x20, 0x60, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x40, 0xe0, 0x00,
+ 0x00, 0x03, 0x06, 0x3c, 0x49, 0x91, 0x21, 0x00, 0x40, 0x80, 0x80, 0x80, 0x80, 0x00, 0x60, 0x00,
+ 0x00, 0x60, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x00, 0x21, 0x91, 0x49, 0x3c, 0x06, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1f, 0x60, 0x40, 0xc0, 0x06, 0x0e, 0x0f, 0x67, 0x50, 0xc0,
+ 0xc0, 0x50, 0x67, 0x0f, 0x0e, 0x06, 0xc0, 0x40, 0x60, 0x1f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x7b, 0xc7, 0x8e, 0x1e, 0x3e, 0x3e,
+ 0x3e, 0x3e, 0x1e, 0x8e, 0xc7, 0x7b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x04,
+ 0x04, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x03, 0x03, 0x03, 0x83, 0x03, 0x03, 0x03, 0x83, 0x03, 0x83, 0x03, 0x03, 0x03, 0x83,
+ 0x03, 0x03, 0x83, 0x83, 0x83, 0x03, 0x03, 0x83, 0x83, 0x83, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x04, 0x06, 0x09, 0x10, 0x00, 0x1f, 0x03, 0x06, 0x0c, 0x1f,
+ 0x00, 0x0f, 0x10, 0x10, 0x10, 0x0f, 0x00, 0x1f, 0x12, 0x12, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x78, 0xfc, 0x84, 0xa4, 0xa4, 0x68, 0x00, 0x78, 0x84, 0x84, 0x84, 0x78, 0x00, 0xfc, 0x94,
+ 0x94, 0x68, 0x00, 0xfc, 0x80, 0x80, 0x80, 0x00, 0xfc, 0x00, 0xfc, 0x18, 0x30, 0x60, 0xfc, 0x00,
+ 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
+ 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
+ 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x50, 0x50, 0x50, 0x00, 0xf0, 0x00, 0x00,
+ 0x00, 0xf0, 0x00, 0xf0, 0x50, 0x50, 0x50, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
+ 0x01, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00
+
+ };
+ oled_write_raw_P(my_logo, sizeof(my_logo));
+}
+
+/* text display for layer indication */
+void oled_task_user(void) {
+
+ render_logo();
+ oled_set_cursor(0,11);
+ oled_advance_char();
+ switch (get_highest_layer(layer_state)) {
+ case 0:
+ oled_write_P(PSTR("ONE\n"), false);
+ break;
+ case 1:
+ oled_write_P(PSTR("TWO\n"), false);
+ break;
+ }
+
+}
+#endif
+
diff --git a/keyboards/knobgoblin/keymaps/ortho/readme.md b/keyboards/knobgoblin/keymaps/ortho/readme.md
new file mode 100644
index 0000000000..9a37b43c63
--- /dev/null
+++ b/keyboards/knobgoblin/keymaps/ortho/readme.md
@@ -0,0 +1,8 @@
+# KNOBGOBLIN
+
+![Knob Goblin](https://i.imgur.com/JCmj4Is.jpg)
+
+# Ortho Knob Goblin Layout
+
+This is the ortho layout for the Knob Goblin. key assignments to be used as a standard numpad layout
+with 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 0000000000..f82c0178a0
--- /dev/null
+++ b/keyboards/knobgoblin/knobgoblin.c
@@ -0,0 +1,17 @@
+/* Copyright 2020 MrT1ddl3s
+ *
+ * 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 "knobgoblin.h"
diff --git a/keyboards/knobgoblin/knobgoblin.h b/keyboards/knobgoblin/knobgoblin.h
new file mode 100644
index 0000000000..b5b2cf7e5f
--- /dev/null
+++ b/keyboards/knobgoblin/knobgoblin.h
@@ -0,0 +1,32 @@
+/* Copyright 2020 MrT1ddl3s
+ *
+ * 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/>.
+ */
+
+#pragma once
+#include "quantum.h"
+
+#define LAYOUT_ortho( \
+ K01, K02, K03, K04, \
+ K11, K12, K13, K14, \
+ K21, K22, K23, K24, \
+ K30, K31, K32, K33, K34, \
+ K40, K41, K42, K43, K44 \
+) { \
+ { KC_NO, K01, K02, K03, K04 }, \
+ { KC_NO, K11, K12, K13, K14 }, \
+ { KC_NO, K21, K22, K23, K24 }, \
+ { K30, K31, K32, K33, K34 }, \
+ { K40, K41, K42, K43, K44 } \
+}
diff --git a/keyboards/knobgoblin/readme.md b/keyboards/knobgoblin/readme.md
new file mode 100644
index 0000000000..20ebc92e94
--- /dev/null
+++ b/keyboards/knobgoblin/readme.md
@@ -0,0 +1,15 @@
+# KNOBGOBLIN
+
+![Knob Goblin](https://i.imgur.com/oYnzqqNl.jpg)
+
+A 5x4 numpad with 2x rotary encoder and OLED support.
+
+* Keyboard Maintainer: [MrT1ddl3s](https://github.com/mrT1ddl3s)
+* Hardware Supported: knobgoblin PCB
+* Hardware Availability: Occasional group buy.[knobgoblin.xyz](https://knobgoblin.xyz)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make knobgoblin: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).
diff --git a/keyboards/knobgoblin/rules.mk b/keyboards/knobgoblin/rules.mk
new file mode 100644
index 0000000000..d1c86defb6
--- /dev/null
+++ b/keyboards/knobgoblin/rules.mk
@@ -0,0 +1,25 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = caterina
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+BLUETOOTH_ENABLE = no # Enable Bluetooth
+AUDIO_ENABLE = no # Audio output
+
+ENCODER_ENABLE = yes
+OLED_DRIVER_ENABLE = yes