~ruther/qmk_firmware

7ea54a78376aee85a051a49185aa3555e8da41d2 — Louis Dalibard 3 years ago e2fbcc8
[Keyboard] Add ai macropad (#17722)

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Louis Dalibard <ontake@ontake.dev>
A keyboards/ai/config.h => keyboards/ai/config.h +20 -0
@@ 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

A keyboards/ai/info.json => keyboards/ai/info.json +51 -0
@@ 0,0 1,51 @@
{
    "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", "F7", "B1"],
        "rows": ["D0", "D4", "C6", "D7", "D1"]
    },
    "processor": "atmega32u4",
    "url": "",
    "usb": {
        "device_version": "1.0.0",
        "pid": "0x0000",
        "vid": "0xFEED"
    },
    "layouts": {
        "LAYOUT_ai_5x4_1": {
            "layout": [
                { "matrix": [0, 0], "x": 0, "y": 0.5 },
                { "matrix": [0, 1], "x": 1, "y": 0 },
                { "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.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.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.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 }
            ]
        }
    }
}

A keyboards/ai/keymaps/default/keymap.c => keyboards/ai/keymaps/default/keymap.c +24 -0
@@ 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_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, 
        KC_LCTL, KC_Z,    KC_X,    KC_C,
        KC_MENU, KC_LGUI, KC_LALT
    )
};

A keyboards/ai/readme.md => keyboards/ai/readme.md +34 -0
@@ 0,0 1,34 @@
# 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: 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):

    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

A keyboards/ai/rules.mk => keyboards/ai/rules.mk +1 -0
@@ 0,0 1,1 @@
# This file intentionally left blank