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

Adding new macro board called tapedeck #20161

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5fe2730
Tapedeck Intial Firmware
SamGowland Mar 17, 2023
b0a103e
info json
SamGowland Mar 17, 2023
bbdfc83
remove matrix in json
SamGowland Mar 17, 2023
44c0c35
license header
SamGowland Mar 17, 2023
f8d9340
Update keyboards/tapedeck/info.json
SamGowland Mar 17, 2023
986d3df
Update keyboards/tapedeck/rules.mk
SamGowland Mar 17, 2023
dabb858
Update keyboards/tapedeck/config.h
SamGowland Mar 17, 2023
ae6d17c
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland Mar 17, 2023
268b166
Update keyboards/tapedeck/rules.mk
SamGowland Mar 17, 2023
0ef8e4b
Update keyboards/tapedeck/tapedeck.c
SamGowland Mar 17, 2023
46f10c2
update to info.json
SamGowland Mar 17, 2023
cb019f5
rgb
SamGowland Mar 17, 2023
cf54628
bad comma
SamGowland Mar 17, 2023
61c415e
Update keyboards/tapedeck/info.json
SamGowland Mar 17, 2023
62b4f47
Update keyboards/tapedeck/info.json
SamGowland Mar 17, 2023
907b3d8
Update keyboards/tapedeck/info.json
SamGowland Mar 17, 2023
9c3a9c3
Update keyboards/tapedeck/info.json
SamGowland Mar 17, 2023
083f2db
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland Mar 17, 2023
13f312f
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland Mar 17, 2023
f991ff6
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland Mar 17, 2023
83d888e
Update keyboards/tapedeck/info.json
SamGowland Mar 17, 2023
8ff164b
Update keyboards/tapedeck/readme.md
SamGowland Mar 17, 2023
de298db
Update keyboards/tapedeck/info.json
SamGowland Mar 17, 2023
8cac909
Update keyboards/tapedeck/readme.md
SamGowland Mar 17, 2023
49bee45
Update keyboards/tapedeck/rules.mk
SamGowland Mar 17, 2023
e344a42
Update keyboards/tapedeck/info.json
SamGowland Mar 17, 2023
c7b4209
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland Mar 17, 2023
8c23ede
volume in keyboard not keymap
SamGowland Mar 17, 2023
8311b4d
Update keyboards/tapedeck/info.json
SamGowland Mar 18, 2023
d970bbe
markdown no html
SamGowland Mar 18, 2023
ec38f42
Update keyboards/tapedeck/rules.mk
SamGowland Mar 19, 2023
359139c
Update keyboards/tapedeck/tapedeck.c
SamGowland Mar 20, 2023
2ade9be
Update keyboards/tapedeck/tapedeck.c
SamGowland Mar 20, 2023
e2333f4
enocder map enable
SamGowland Mar 20, 2023
45d39dc
brightness on second encoder by default
SamGowland Mar 21, 2023
d65f512
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland Mar 21, 2023
161697c
Update keyboards/tapedeck/tapedeck.c
SamGowland Mar 21, 2023
5fba777
Update keyboards/tapedeck/tapedeck.c
SamGowland Mar 21, 2023
445016f
Update keyboards/tapedeck/tapedeck.c
SamGowland Mar 21, 2023
2814ca3
Update keyboards/tapedeck/tapedeck.c
SamGowland Mar 21, 2023
9b11d86
Update keyboards/tapedeck/info.json
SamGowland Mar 23, 2023
5e26d20
Update keyboards/tapedeck/info.json
SamGowland Mar 23, 2023
d737559
Update keyboards/tapedeck/keymaps/default/keymap.c
SamGowland Mar 23, 2023
7fa5304
encoder map enable move to keymaps
SamGowland Mar 23, 2023
4c26317
Update keyboards/tapedeck/config.h
SamGowland Mar 24, 2023
cb661f8
Update keyboards/tapedeck/info.json
SamGowland Mar 24, 2023
dee42a0
Only use the slider code if enabled.
SamGowland Mar 26, 2023
d8a0cc5
move to correct folder
SamGowland Apr 11, 2023
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
53 changes: 53 additions & 0 deletions keyboards/tapedeck/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
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/>.
*/
SamGowland marked this conversation as resolved.
Show resolved Hide resolved

#pragma once

#include "config_common.h"

/* Matrix size */
#define MATRIX_ROWS 3
#define MATRIX_COLS 5
SamGowland marked this conversation as resolved.
Show resolved Hide resolved

/* Pin-out */
#define MATRIX_ROW_PINS { B2, B3, B1 }
#define MATRIX_COL_PINS { B5, B4, E6, D7, C6 }
#define QMK_LED B0

#define QMK_ESC_OUTPUT B2
#define QMK_ESC_INPUT B5

/* ROW2COL */
#define DIODE_DIRECTION ROW2COL

/* RGB */
#define RGB_DI_PIN B6
#define RGBLED_NUM 3
#define RGBLIGHT_EFFECT_STATIC_LIGHT
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_LIMIT_VAL 225

/* Rotary Encoder*/
#define ENCODERS_PAD_A { F4, F6 }
#define ENCODERS_PAD_B { F5, F7 }
#define ENCODER_RESOLUTION 4
SamGowland marked this conversation as resolved.
Show resolved Hide resolved

/* SLIDER */
#define POT_ENABLE

Comment on lines +19 to +21
Copy link
Member

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.

Suggested change
/* SLIDER */
#define POT_ENABLE

Copy link
Contributor Author

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.

Copy link
Member

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?

18 changes: 18 additions & 0 deletions keyboards/tapedeck/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"keyboard_name": "Tapedeck",
"manufacturer": "Gowla",
"maintainer": "Gowla",
"url": "https://github.com/SamGowland/Gowla-Macro-Boards"
"bootloader": "qmk-dfu",
"diode_direction": "ROW2COL",
"usb": {
"vid": "0xFEED",
"pid": "0x0000",
"device_version": "1.0.0"
},
SamGowland marked this conversation as resolved.
Show resolved Hide resolved
"layouts": {
"LAYOUT": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":5, "y":0.5}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":5, "y":1.75}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}]
}
}
}
116 changes: 116 additions & 0 deletions keyboards/tapedeck/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/* 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
#include "print.h"
SamGowland marked this conversation as resolved.
Show resolved Hide resolved

#define BASE 0

#ifdef POT_ENABLE
#include "analog.h"
#endif

int16_t pot_val = 0;
int16_t prev_val = 0;
int16_t val = 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
)
};

SamGowland marked this conversation as resolved.
Show resolved Hide resolved
bool encoder_update_kb(uint8_t index, bool clockwise) {
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 false;
};

SamGowland marked this conversation as resolved.
Show resolved Hide resolved
void matrix_init_user(void) {
#ifdef POT_ENABLE
analogReference(ADC_REF_POWER);
#endif
}

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);

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;
}

void matrix_scan_user(void) {
#ifdef POT_ENABLE
slider();
#endif
}
SamGowland marked this conversation as resolved.
Show resolved Hide resolved

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// If console is enabled, it will print the matrix position and status of each key pressed
#ifdef CONSOLE_ENABLE
uprintf("KL: kc: 0x%04X, col: %u, row: %u, pressed: %b, time: %u, interrupt: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
#endif
return true;
}
SamGowland marked this conversation as resolved.
Show resolved Hide resolved

#ifdef RGBLIGHT_ENABLE
void keyboard_post_init_user(void) {
// led hue, sat, val, led
rgblight_sethsv_range(HSV_GREEN, 0, 2);
rgblight_sethsv_noeeprom(HSV_GREEN);
}
#endif




SamGowland marked this conversation as resolved.
Show resolved Hide resolved


SamGowland marked this conversation as resolved.
Show resolved Hide resolved
17 changes: 17 additions & 0 deletions keyboards/tapedeck/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Gowla Tapedeck

<p align="center">
<img src="https://github.com/SamGowland/Gowla-Macro-Board/blob/master/Images/purple.PNG" height="400">
</p>
SamGowland marked this conversation as resolved.
Show resolved Hide resolved

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/light:default
SamGowland marked this conversation as resolved.
Show resolved Hide resolved

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
34 changes: 34 additions & 0 deletions keyboards/tapedeck/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# MCU name
MCU = atmega32u4

# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = qmk-dfu

SamGowland marked this conversation as resolved.
Show resolved Hide resolved
# Build Options
# change yes to no to disable
#
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
ENCODER_ENABLE = yes # Enable Rotary Encoder
CONSOLE_ENABLE = no # 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 = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
SRC += analog.c
SamGowland marked this conversation as resolved.
Show resolved Hide resolved
CONSOLE_ENABLE = yes
SamGowland marked this conversation as resolved.
Show resolved Hide resolved
BOOTMAGIC_ENABLE = yes
17 changes: 17 additions & 0 deletions keyboards/tapedeck/tapedeck.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* 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 "tapedeck.h"
SamGowland marked this conversation as resolved.
Show resolved Hide resolved
29 changes: 29 additions & 0 deletions keyboards/tapedeck/tapedeck.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* 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

#include "quantum.h"

#define LAYOUT( \
k00, k01, k02, k03, k04, \
k10, k11, k12, k13, k14,\
k20, k21, k22, k23 \
) { \
{ k00, k01, k02, k03, k04, }, \
{ k10, k11, k12, k13, k14, }, \
{ k20, k21, k22, k23 } \
}
SamGowland marked this conversation as resolved.
Show resolved Hide resolved