From d54386f773229501caf9935c29d546e9d9ee0121 Mon Sep 17 00:00:00 2001 From: Louis Dalibard Date: Tue, 19 Jul 2022 19:25:01 +0200 Subject: [PATCH 1/6] Add Ai keyboard --- keyboards/ai/config.h | 20 +++++++++++ keyboards/ai/info.json | 52 +++++++++++++++++++++++++++ keyboards/ai/keymaps/default/keymap.c | 24 +++++++++++++ keyboards/ai/readme.md | 27 ++++++++++++++ keyboards/ai/rules.mk | 1 + 5 files changed, 124 insertions(+) create mode 100644 keyboards/ai/config.h create mode 100644 keyboards/ai/info.json create mode 100644 keyboards/ai/keymaps/default/keymap.c create mode 100644 keyboards/ai/readme.md create mode 100644 keyboards/ai/rules.mk diff --git a/keyboards/ai/config.h b/keyboards/ai/config.h new file mode 100644 index 000000000000..ceac109fb214 --- /dev/null +++ b/keyboards/ai/config.h @@ -0,0 +1,20 @@ +// Copyright 2022 Louis Dalibard (@make42) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT diff --git a/keyboards/ai/info.json b/keyboards/ai/info.json new file mode 100644 index 000000000000..686ccc44c466 --- /dev/null +++ b/keyboards/ai/info.json @@ -0,0 +1,52 @@ +{ + "manufacturer": "Louis Dalibard", + "keyboard_name": "ai", + "maintainer": "make42", + "bootloader": "caterina", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["F5", "F6", "F6", "B1"], + "rows": ["D7", "C6", "D4", "D0", "D1"] + }, + "processor": "atmega32u4", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_ortho_5x4": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1 }, + { "matrix": [1, 1], "x": 1, "y": 1 }, + { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [2, 0], "x": 0, "y": 2 }, + { "matrix": [2, 1], "x": 1, "y": 2 }, + { "matrix": [2, 2], "x": 2, "y": 2 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [3, 0], "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 1, "y": 3 }, + { "matrix": [3, 2], "x": 2, "y": 3 }, + { "matrix": [3, 3], "x": 3, "y": 3 }, + { "matrix": [4, 0], "x": 0, "y": 4 }, + { "matrix": [4, 1], "x": 1, "y": 4 }, + { "matrix": [4, 2], "x": 2, "y": 4 }, + { "matrix": [4, 3], "x": 3, "y": 4 } + ] + } + } +} diff --git a/keyboards/ai/keymaps/default/keymap.c b/keyboards/ai/keymaps/default/keymap.c new file mode 100644 index 000000000000..09945a069e79 --- /dev/null +++ b/keyboards/ai/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┐ + * │Tab│ Q │ W │ E │ + * ├───┼───┼───┼───┤ + * │Bsp│ R │ T │ A │ + * ├───┼───┼───┼───┤ + * │Sft│ S │ D │ F │ + * ├───┼───┼───┼───┤ + * │Ctl│ Z │ X │ C │ + * ├───┼───┼───┼───┤ + * │NaN│App│GUI│Alt│ + * └───┴───┴───┴───┘ + */ + [0] = LAYOUT_ortho_5x4( + KC_TAB, KC_Q, KC_W, KC_E, + KC_BSPC, KC_R, KC_T, KC_A, + KC_LSFT, KC_S, KC_D, KC_F, + KC_LCTL, KC_Z, KC_X, KC_C, + KC_LCTL, KC_MENU, KC_LGUI, KC_LALT + ) +}; diff --git a/keyboards/ai/readme.md b/keyboards/ai/readme.md new file mode 100644 index 000000000000..ab6417320b82 --- /dev/null +++ b/keyboards/ai/readme.md @@ -0,0 +1,27 @@ +# ai + +![ai](https://i.imgur.com/4l6BzRh.png) + +_This is a small open source 5x4-1 macropad powered by QMK_ + +- Keyboard Maintainer: [Louis Dalibard](https://github.com/make42) +- Hardware Supported: _The PCB for ai is located here: [ai](https://github.com/make42/ai)_ +- Hardware Availability: _Links to where you can find this hardware_ + +Make example for this keyboard (after setting up your build environment): + + make ai:default + +Flashing example for this keyboard: + + make ai:default:flash + +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 (usually the top left key or Escape) and plug in the keyboard +- **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +- **Keycode in layout**: Press the key mapped to `RESET` if it is available diff --git a/keyboards/ai/rules.mk b/keyboards/ai/rules.mk new file mode 100644 index 000000000000..6e7633bfe015 --- /dev/null +++ b/keyboards/ai/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank From 8d8b7b4a0a3e997165329f1a534cba28b7edffc3 Mon Sep 17 00:00:00 2001 From: Louis Dalibard Date: Tue, 19 Jul 2022 19:30:29 +0200 Subject: [PATCH 2/6] Add Ai keyboard --- keyboards/ai/info.json | 1 - keyboards/ai/keymaps/default/keymap.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/ai/info.json b/keyboards/ai/info.json index 686ccc44c466..b040cee064d1 100644 --- a/keyboards/ai/info.json +++ b/keyboards/ai/info.json @@ -42,7 +42,6 @@ { "matrix": [3, 1], "x": 1, "y": 3 }, { "matrix": [3, 2], "x": 2, "y": 3 }, { "matrix": [3, 3], "x": 3, "y": 3 }, - { "matrix": [4, 0], "x": 0, "y": 4 }, { "matrix": [4, 1], "x": 1, "y": 4 }, { "matrix": [4, 2], "x": 2, "y": 4 }, { "matrix": [4, 3], "x": 3, "y": 4 } diff --git a/keyboards/ai/keymaps/default/keymap.c b/keyboards/ai/keymaps/default/keymap.c index 09945a069e79..48b345baf37e 100644 --- a/keyboards/ai/keymaps/default/keymap.c +++ b/keyboards/ai/keymaps/default/keymap.c @@ -19,6 +19,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_BSPC, KC_R, KC_T, KC_A, KC_LSFT, KC_S, KC_D, KC_F, KC_LCTL, KC_Z, KC_X, KC_C, - KC_LCTL, KC_MENU, KC_LGUI, KC_LALT + KC_MENU, KC_LGUI, KC_LALT ) }; From 606dd8008aa2f17fa08a638fce329b02354a9cfd Mon Sep 17 00:00:00 2001 From: Louis Dalibard Date: Wed, 20 Jul 2022 19:18:50 +0200 Subject: [PATCH 3/6] Change the positions of the keys in the configurator to something prettier... --- keyboards/ai/info.json | 32 +++++++++++++-------------- keyboards/ai/keymaps/default/keymap.c | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/keyboards/ai/info.json b/keyboards/ai/info.json index b040cee064d1..013d119a9586 100644 --- a/keyboards/ai/info.json +++ b/keyboards/ai/info.json @@ -24,27 +24,27 @@ "vid": "0xFEED" }, "layouts": { - "LAYOUT_ortho_5x4": { + "LAYOUT_ai_5x4_1": { "layout": [ - { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 0], "x": 0, "y": 0.5 }, { "matrix": [0, 1], "x": 1, "y": 0 }, - { "matrix": [0, 2], "x": 2, "y": 0 }, - { "matrix": [0, 3], "x": 3, "y": 0 }, - { "matrix": [1, 0], "x": 0, "y": 1 }, + { "matrix": [0, 2], "x": 2, "y": 0.3 }, + { "matrix": [0, 3], "x": 3, "y": 0.7 }, + { "matrix": [1, 0], "x": 0, "y": 1.5 }, { "matrix": [1, 1], "x": 1, "y": 1 }, - { "matrix": [1, 2], "x": 2, "y": 1 }, - { "matrix": [1, 3], "x": 3, "y": 1 }, - { "matrix": [2, 0], "x": 0, "y": 2 }, + { "matrix": [1, 2], "x": 2, "y": 1.3 }, + { "matrix": [1, 3], "x": 3, "y": 1.7 }, + { "matrix": [2, 0], "x": 0, "y": 2.5 }, { "matrix": [2, 1], "x": 1, "y": 2 }, - { "matrix": [2, 2], "x": 2, "y": 2 }, - { "matrix": [2, 3], "x": 3, "y": 2 }, - { "matrix": [3, 0], "x": 0, "y": 3 }, + { "matrix": [2, 2], "x": 2, "y": 2.3 }, + { "matrix": [2, 3], "x": 3, "y": 2.7 }, + { "matrix": [3, 0], "x": 0, "y": 3.5 }, { "matrix": [3, 1], "x": 1, "y": 3 }, - { "matrix": [3, 2], "x": 2, "y": 3 }, - { "matrix": [3, 3], "x": 3, "y": 3 }, - { "matrix": [4, 1], "x": 1, "y": 4 }, - { "matrix": [4, 2], "x": 2, "y": 4 }, - { "matrix": [4, 3], "x": 3, "y": 4 } + { "matrix": [3, 2], "x": 2, "y": 3.3 }, + { "matrix": [3, 3], "x": 3, "y": 3.7 }, + { "matrix": [4, 1], "x": 2.5, "y": 5 }, + { "matrix": [4, 2], "x": 3.5, "y": 4.8 }, + { "matrix": [4, 3], "x": 4.5, "y": 4.6 } ] } } diff --git a/keyboards/ai/keymaps/default/keymap.c b/keyboards/ai/keymaps/default/keymap.c index 48b345baf37e..c94847677607 100644 --- a/keyboards/ai/keymaps/default/keymap.c +++ b/keyboards/ai/keymaps/default/keymap.c @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │NaN│App│GUI│Alt│ * └───┴───┴───┴───┘ */ - [0] = LAYOUT_ortho_5x4( + [0] = LAYOUT_ai_5x4_1( KC_TAB, KC_Q, KC_W, KC_E, KC_BSPC, KC_R, KC_T, KC_A, KC_LSFT, KC_S, KC_D, KC_F, From 37aaf60f96e772e569e9e30ab65c0602cc9246c6 Mon Sep 17 00:00:00 2001 From: Louis Dalibard Date: Thu, 21 Jul 2022 11:49:35 +0200 Subject: [PATCH 4/6] Update keyboards/ai/readme.md Co-authored-by: Ryan --- keyboards/ai/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ai/readme.md b/keyboards/ai/readme.md index ab6417320b82..2d849cfca5d5 100644 --- a/keyboards/ai/readme.md +++ b/keyboards/ai/readme.md @@ -2,11 +2,11 @@ ![ai](https://i.imgur.com/4l6BzRh.png) -_This is a small open source 5x4-1 macropad powered by QMK_ +This is a small open source 5x4-1 macropad powered by QMK -- Keyboard Maintainer: [Louis Dalibard](https://github.com/make42) -- Hardware Supported: _The PCB for ai is located here: [ai](https://github.com/make42/ai)_ -- Hardware Availability: _Links to where you can find this hardware_ +* Keyboard Maintainer: [Louis Dalibard](https://github.com/make42) +* Hardware Supported: The PCB for ai is located here: [ai](https://github.com/make42/ai) +* Hardware Availability: Links to where you can find this hardware Make example for this keyboard (after setting up your build environment): From 43232cea37bfcbea59b15b160ba17db6e3969ee2 Mon Sep 17 00:00:00 2001 From: Louis Dalibard Date: Thu, 21 Jul 2022 12:08:12 +0200 Subject: [PATCH 5/6] Fix documentation --- keyboards/ai/readme.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/keyboards/ai/readme.md b/keyboards/ai/readme.md index 2d849cfca5d5..670996640fba 100644 --- a/keyboards/ai/readme.md +++ b/keyboards/ai/readme.md @@ -6,7 +6,14 @@ This is a small open source 5x4-1 macropad powered by QMK * Keyboard Maintainer: [Louis Dalibard](https://github.com/make42) * Hardware Supported: The PCB for ai is located here: [ai](https://github.com/make42/ai) -* Hardware Availability: Links to where you can find this hardware +* Hardware Availability: Here is a complete BOM with links to where you can find parts: + * PCB (I personally used JLCPCB) + * Arduino Pro Micro ([Aliexpress](https://fr.aliexpress.com/item/32768308647.html?spm=a2g0o.order_list.0.0.3ccc5e5bU64POK&gatewayAdapt=glo2fra)) + * Female pin rows ([Aliexpress]https://fr.aliexpress.com/item/4001122376295.html?spm=a2g0o.order_list.0.0.23845e5bTBt8sp&gatewayAdapt=glo2fra)) + * Gateron hotswap sockets ([Aliexpress](https://fr.aliexpress.com/item/1005003129613578.html?spm=a2g0o.order_list.0.0.23845e5bTBt8sp&gatewayAdapt=glo2fra)) + * Zener diodes ([Aliexpress](https://fr.aliexpress.com/item/1005003276184193.html?spm=a2g0o.order_list.0.0.23845e5bTBt8sp&gatewayAdapt=glo2fra)) + * Keyswitches (use a compatible MX switch) + * Keycaps (Duh) Make example for this keyboard (after setting up your build environment): From 4090a7a08e9f5edcedcd6c3804050dbca72cf97e Mon Sep 17 00:00:00 2001 From: Louis Dalibard Date: Sun, 14 Aug 2022 17:26:32 +0200 Subject: [PATCH 6/6] Sync changes to firmware --- keyboards/ai/info.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/ai/info.json b/keyboards/ai/info.json index 013d119a9586..3f0f7ffbcaca 100644 --- a/keyboards/ai/info.json +++ b/keyboards/ai/info.json @@ -13,8 +13,8 @@ "nkro": true }, "matrix_pins": { - "cols": ["F5", "F6", "F6", "B1"], - "rows": ["D7", "C6", "D4", "D0", "D1"] + "cols": ["F5", "F6", "F7", "B1"], + "rows": ["D0", "D4", "C6", "D7", "D1"] }, "processor": "atmega32u4", "url": "",