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

[Keyboard] Add a new keyboard #20158

Merged
merged 10 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions keyboards/ning/tiny_board/tb16_rgb/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* Copyright 2023 Ning (@ningjx)
*
* 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

/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 4

#define TAPPING_TERM 200

ningjx marked this conversation as resolved.
Show resolved Hide resolved
#define RGB_DI_PIN B5
#define RGB_MATRIX_LED_COUNT 16

#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP

#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_TYPING_HEATMAP
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS




48 changes: 48 additions & 0 deletions keyboards/ning/tiny_board/tb16_rgb/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"manufacturer": "Ning",
"keyboard_name": "TB16 RGB",
"maintainer": "ningjx",
"bootloader": "caterina",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true
ningjx marked this conversation as resolved.
Show resolved Hide resolved
},
"matrix_pins": {
"cols": ["B6", "B1", "B3", "B2"],
"rows": ["F7", "F6", "F5", "F4"]
},
"processor": "atmega32u4",
"url": "",
"usb": {
"device_version": "1.0.0",
"pid": "0x0000",
"vid": "0xFEED"
},
"layouts": {
"LAYOUT_ortho_4x4": {
"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 }
]
}
}
}
51 changes: 51 additions & 0 deletions keyboards/ning/tiny_board/tb16_rgb/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* Copyright 2023 Ning (@ningjx)
*
* 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] = {
/*
* ┌───┬───┬───┬───┐
* │ 7 │ 8 │ 9 │RGB│
* ├───┼───┼───┼───┤
* │ 4 │ 5 │ 6 │MOD│
* ├───┼───┼───┼───┤
* │ 1 │ 2 │ 3 │ - │
* ├───┼───┼───┼───┤
* │ 0 │ . │Ent│ + │
* └───┴───┴───┴───┘
*/
[0] = LAYOUT_ortho_4x4(
KC_P7, KC_P8, KC_P9, RGB_TOG,
KC_P4, KC_P5, KC_P6, RGB_MODE_FORWARD,
KC_P1, KC_P2, KC_P3, KC_PMNS,
KC_P0, KC_PDOT, KC_PENT, KC_PPLS
)
};

led_config_t g_led_config = { {
ningjx marked this conversation as resolved.
Show resolved Hide resolved
{ 0, 1, 2, 3 },
{ 4, 5, 6, 7 },
{ 8, 9, 10, 11 },
{ 12, 13, 14, 15 }
}, {
{0,0},{75,0},{150,0},{224,0},
{0,21},{75,21},{150,21},{224,21},
{0,42},{75,42},{150,42},{224,42},
{0,64},{75,64},{150,64},{224,64}
}, {
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
} };
51 changes: 51 additions & 0 deletions keyboards/ning/tiny_board/tb16_rgb/keymaps/ningjx/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* Copyright 2023 Ning (@ningjx)
*
* 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] = {
/*
* ┌───┬───┬───┬───┐
* │ 7 │ 8 │ 9 │RGB│
* ├───┼───┼───┼───┤
* │ 4 │ 5 │ 6 │MOD│
* ├───┼───┼───┼───┤
* │ 1 │ 2 │ 3 │ - │
* ├───┼───┼───┼───┤
* │ 0 │ . │Ent│ + │
* └───┴───┴───┴───┘
*/
[0] = LAYOUT_ortho_4x4(
KC_P7, KC_P8, KC_P9, RGB_TOG,
KC_P4, KC_P5, KC_P6, RGB_MODE_FORWARD,
KC_P1, KC_P2, KC_P3, KC_PMNS,
KC_P0, KC_PDOT, KC_PENT, KC_PPLS
)
};

led_config_t g_led_config = { {
ningjx marked this conversation as resolved.
Show resolved Hide resolved
{ 0, 1, 2, 3 },
{ 4, 5, 6, 7 },
{ 8, 9, 10, 11 },
{ 12, 13, 14, 15 }
}, {
{0,0},{75,0},{150,0},{224,0},
{0,21},{75,21},{150,21},{224,21},
{0,42},{75,42},{150,42},{224,42},
{0,64},{75,64},{150,64},{224,64}
}, {
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
} };
27 changes: 27 additions & 0 deletions keyboards/ning/tiny_board/tb16_rgb/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ning/tiny_board/tb16_rgb

![ning/tiny_board/tb16_rgb](imgur.com image replace me!)
ningjx marked this conversation as resolved.
Show resolved Hide resolved

*A short description of the keyboard/project*

* Keyboard Maintainer: [Ning](https://github.com/ningjx)
* Hardware Supported: *The PCBs, controllers supported*
* Hardware Availability: *Links to where you can find this hardware*
ningjx marked this conversation as resolved.
Show resolved Hide resolved

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

make ning/tiny_board/tb16_rgb:default

Flashing example for this keyboard:

make ning/tiny_board/tb16_rgb: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 `QK_BOOT` if it is available
6 changes: 6 additions & 0 deletions keyboards/ning/tiny_board/tb16_rgb/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file intentionally left blank
MCU = atmega32u4
BOOTLOADER = caterina
RGB_MATRIX_ENABLE = yes
ningjx marked this conversation as resolved.
Show resolved Hide resolved
RGB_MATRIX_DRIVER = WS2812
WS2812_DRIVER = bitbang