-
-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Adding new macro board called tapedeck #20161
Closed
Closed
Changes from 47 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
5fe2730
Tapedeck Intial Firmware
SamGowland b0a103e
info json
SamGowland bbdfc83
remove matrix in json
SamGowland 44c0c35
license header
SamGowland f8d9340
Update keyboards/tapedeck/info.json
SamGowland 986d3df
Update keyboards/tapedeck/rules.mk
SamGowland dabb858
Update keyboards/tapedeck/config.h
SamGowland ae6d17c
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland 268b166
Update keyboards/tapedeck/rules.mk
SamGowland 0ef8e4b
Update keyboards/tapedeck/tapedeck.c
SamGowland 46f10c2
update to info.json
SamGowland cb019f5
rgb
SamGowland cf54628
bad comma
SamGowland 61c415e
Update keyboards/tapedeck/info.json
SamGowland 62b4f47
Update keyboards/tapedeck/info.json
SamGowland 907b3d8
Update keyboards/tapedeck/info.json
SamGowland 9c3a9c3
Update keyboards/tapedeck/info.json
SamGowland 083f2db
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland 13f312f
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland f991ff6
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland 83d888e
Update keyboards/tapedeck/info.json
SamGowland 8ff164b
Update keyboards/tapedeck/readme.md
SamGowland de298db
Update keyboards/tapedeck/info.json
SamGowland 8cac909
Update keyboards/tapedeck/readme.md
SamGowland 49bee45
Update keyboards/tapedeck/rules.mk
SamGowland e344a42
Update keyboards/tapedeck/info.json
SamGowland c7b4209
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland 8c23ede
volume in keyboard not keymap
SamGowland 8311b4d
Update keyboards/tapedeck/info.json
SamGowland d970bbe
markdown no html
SamGowland ec38f42
Update keyboards/tapedeck/rules.mk
SamGowland 359139c
Update keyboards/tapedeck/tapedeck.c
SamGowland 2ade9be
Update keyboards/tapedeck/tapedeck.c
SamGowland e2333f4
enocder map enable
SamGowland 45d39dc
brightness on second encoder by default
SamGowland d65f512
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland 161697c
Update keyboards/tapedeck/tapedeck.c
SamGowland 5fba777
Update keyboards/tapedeck/tapedeck.c
SamGowland 445016f
Update keyboards/tapedeck/tapedeck.c
SamGowland 2814ca3
Update keyboards/tapedeck/tapedeck.c
SamGowland 9b11d86
Update keyboards/tapedeck/info.json
SamGowland 5e26d20
Update keyboards/tapedeck/info.json
SamGowland d737559
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland 7fa5304
encoder map enable move to keymaps
SamGowland 4c26317
Update keyboards/tapedeck/config.h
SamGowland cb661f8
Update keyboards/tapedeck/info.json
SamGowland dee42a0
Only use the slider code if enabled.
SamGowland d8a0cc5
move to correct folder
SamGowland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* Copyright 2023 Gowla | ||
* | ||
* 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 | ||
|
||
/* SLIDER */ | ||
#define POT_ENABLE | ||
|
||
/* RGB Default */ | ||
# define RGB_MATRIX_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_MOOD | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"manufacturer": "Gowla", | ||
"keyboard_name": "Tapedeck", | ||
"maintainer": "Gowla", | ||
"development_board": "promicro", | ||
"diode_direction": "ROW2COL", | ||
"encoder": { | ||
"rotary": [ | ||
{ | ||
"pin_a": "F4", | ||
"pin_b": "F5" | ||
}, | ||
{ | ||
"pin_a": "F6", | ||
"pin_b": "F7" | ||
} | ||
] | ||
}, | ||
"features": { | ||
"bootmagic": true, | ||
"encoder": true, | ||
"extrakey": true, | ||
"mousekey": true, | ||
"nkro": true, | ||
"rgblight": true, | ||
}, | ||
"matrix_pins": { | ||
"cols": ["B5", "B4", "E6", "D7", "C6"], | ||
"rows": ["B2", "B3", "B1"] | ||
}, | ||
"rgblight": { | ||
"led_count": 3, | ||
"pin": "B6", | ||
"animations": { | ||
"knight": true, | ||
"rainbow_swirl": true, | ||
"rainbow_mood": true, | ||
"rgb_test": true | ||
} | ||
}, | ||
"url": "https://github.com/SamGowland/Gowla-Macro-Boards", | ||
"usb": { | ||
"device_version": "1.0.0", | ||
"pid": "0x0000", | ||
"vid": "0xFEED" | ||
}, | ||
SamGowland marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"layouts": { | ||
"LAYOUT": { | ||
"layout": [ | ||
{ "label": "k00", "matrix": [0, 0], "x": 0, "y": 0 }, | ||
{ "label": "k01", "matrix": [0, 1], "x": 1, "y": 0 }, | ||
{ "label": "k02", "matrix": [0, 2], "x": 2, "y": 0 }, | ||
{ "label": "k03", "matrix": [0, 3], "x": 3, "y": 0 }, | ||
{ "label": "k04", "matrix": [0, 4], "x": 5, "y": 0.5 }, | ||
{ "label": "k10", "matrix": [1, 0], "x": 0, "y": 1 }, | ||
{ "label": "k11", "matrix": [1, 1], "x": 1, "y": 1 }, | ||
{ "label": "k12", "matrix": [1, 2], "x": 2, "y": 1 }, | ||
{ "label": "k13", "matrix": [1, 3], "x": 3, "y": 1 }, | ||
{ "label": "k14", "matrix": [1, 4], "x": 5, "y": 1.75 }, | ||
{ "label": "k20", "matrix": [2, 0], "x": 0, "y": 2 }, | ||
{ "label": "k21", "matrix": [2, 1], "x": 1, "y": 2 }, | ||
{ "label": "k22", "matrix": [2, 2], "x": 2, "y": 2 }, | ||
{ "label": "k23", "matrix": [2, 3], "x": 3, "y": 2 } | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* Copyright 2023 Gowla | ||
* | ||
* 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 | ||
|
||
#define BASE 0 | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[BASE] = LAYOUT( | ||
KC_ESC, KC_MNXT, KC_MPLY, KC_MNXT, KC_MPLY, | ||
RGB_MODE_RAINBOW, RGB_MODE_RGBTEST, RGB_M_K, RGB_TOG, KC_MPLY, | ||
KC_F1, KC_F2, KC_F3, KC_F14 | ||
) | ||
}; | ||
|
||
SamGowland marked this conversation as resolved.
Show resolved
Hide resolved
|
||
#ifdef ENCODER_MAP_ENABLE | ||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { | ||
[BASE] = { ENCODER_CCW_CW(KC_WH_D, KC_WH_U), ENCODER_CCW_CW(KC_BRID, KC_BRIU) } | ||
}; | ||
#endif |
SamGowland marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Build Options | ||
# change yes to no to disable | ||
# | ||
ENCODER_MAP_ENABLE = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Gowla Tapedeck | ||
|
||
![Image of Tapedeck](https://i.ibb.co/R3JVMjM/tapedeck.jpg) | ||
|
||
4x4 12 Key Macro Board with 60MM Slider, RGB and 2 X Rotary Encoders. For use with QMK, designed and sold by Gowla. | ||
|
||
* Keyboard Maintainer: [Gowla](https://github.com/SamGowland/) | ||
* Hardware Supported: Pro Micro ATmega32U4, Cherry MX Switches, Alps 60MM Slider | ||
* Hardware Availability: [Repo](https://github.com/SamGowland/Gowla-Macro-Boards) | ||
|
||
Make example for this keyboard (after setting up your build environment): | ||
|
||
make tapedeck:default | ||
|
||
Flashing example for this keyboard: | ||
|
||
make tapedeck: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). | ||
SamGowland marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Bootloader | ||
|
||
Enter the bootloader in 3 ways: | ||
|
||
* **Bootmagic reset**: Hold down the top-left key (underneath the Pro Micro) and plug in the keyboard. This will also clear EEPROM, so it is a good first step if the keyboard is misbehaving. | ||
* **Physical reset**: Remove the back plate and short the `RST` and `GND` pins on the Pro Micro. | ||
* **Keycode in layout**: There is no key mapped to `QK_BOOT` in the pre-created keymaps, but you may assign this key in any keymaps you create. | ||
|
||
As a Pro Micro-compatible board, the Gowla Tapedeck uses `caterina` as its bootloader by default. Many popular Pro Micro alternatives like the Elite-C, Bit-C, Sea-Micro, Puchi-C etc should be flashed with a different bootloader such as `atmel-dfu`. | ||
|
||
If the incorrect bootloader is specified, bootmagic reset and the `QK_BOOT` keycode will not work. | ||
|
||
To avoid this problem, set the correct bootloader in your custom keymap's `rules.mk` file before compiling, or flash using an appropriate target (e.g. `make tapedeck:default:dfu`). See [flashing instructions and bootloader information](https://docs.qmk.fm/#/flashing) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Build Options | ||
# change yes to no to disable | ||
# | ||
QUANTUM_LIB_SRC += analog.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* Copyright 2023 Gowla | ||
* | ||
* 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 "quantum.h" | ||
|
||
#ifdef POT_ENABLE | ||
#include "analog.h" | ||
#endif | ||
|
||
bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
if (!encoder_update_user(index, clockwise)) { | ||
return false; | ||
} | ||
if (index == 0) { /* First encoder */ | ||
if (clockwise) { | ||
tap_code(KC_WH_U); | ||
} else { | ||
tap_code(KC_WH_D); | ||
} | ||
} else if (index == 1) { /* Second encoder */ | ||
if (clockwise) { | ||
tap_code(KC_BRIU); | ||
} else { | ||
tap_code(KC_BRID); | ||
} | ||
} | ||
return true; | ||
} | ||
|
||
void keyboard_post_init_kb(void) { | ||
#ifdef POT_ENABLE | ||
analogReference(ADC_REF_POWER); | ||
#endif | ||
SamGowland marked this conversation as resolved.
Show resolved
Hide resolved
|
||
keyboard_post_init_user(); | ||
} | ||
|
||
#ifdef POT_ENABLE | ||
int16_t pot_val = 0; | ||
int16_t prev_val = 0; | ||
int16_t val = 0; | ||
uint8_t divisor = 0; | ||
|
||
long map(long x, long in_min, long in_max, long out_min, long out_max) | ||
{ | ||
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; | ||
} | ||
|
||
void slider(void) { | ||
if (divisor++) { // only run the slider function 1/256 times it's called | ||
return; | ||
} | ||
|
||
pot_val = analogReadPin(D4); | ||
val = map(pot_val, 0, 1023, 1, 50); // Windows Specific | ||
|
||
if (( val > (prev_val + 1)) && val != prev_val){ | ||
int i; | ||
for (i = prev_val; i < val; i++ ) | ||
{tap_code(KC_VOLU);} | ||
} | ||
if ((val < (prev_val - 1)) && val != prev_val){ | ||
int i; | ||
for (i = val; i < prev_val; i++ ) | ||
{tap_code(KC_VOLD);} | ||
} | ||
prev_val = val; | ||
} | ||
#endif | ||
|
||
void housekeeping_task_kb(void) { | ||
#ifdef POT_ENABLE | ||
slider(); | ||
#endif | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless there's a reason to leave this guard, this file should just be removed all together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Place to enable/disable slider was my thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except the implementation doesnt really allow that?