diff options
author | Blake <blake@ghost7.com> | 2021-03-25 11:53:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-25 22:53:30 +1100 |
commit | c4d05010cb4dad42740d67003bf66b67e10fe854 (patch) | |
tree | a71871b280cecb8be58f737c5c17e5f4a78a13e0 /keyboards/draytronics | |
parent | 6276f54752e98ab1f99eaff5c077c52bf29e5c81 (diff) | |
download | qmk_firmware-c4d05010cb4dad42740d67003bf66b67e10fe854.tar.gz qmk_firmware-c4d05010cb4dad42740d67003bf66b67e10fe854.zip |
Add Daisy, a macropad with dual rotary encoders + update Scarlet readme.md (#12221)
* Daisy first commit buggy
* buggy still underglow crash
* Daisy V1
* ReadMe Updates
Diffstat (limited to 'keyboards/draytronics')
-rw-r--r-- | keyboards/draytronics/daisy/config.h | 112 | ||||
-rw-r--r-- | keyboards/draytronics/daisy/daisy.c | 19 | ||||
-rw-r--r-- | keyboards/draytronics/daisy/daisy.h | 33 | ||||
-rw-r--r-- | keyboards/draytronics/daisy/info.json | 25 | ||||
-rw-r--r-- | keyboards/draytronics/daisy/keymaps/default/keymap.c | 51 | ||||
-rw-r--r-- | keyboards/draytronics/daisy/readme.md | 20 | ||||
-rw-r--r-- | keyboards/draytronics/daisy/rules.mk | 23 | ||||
-rw-r--r-- | keyboards/draytronics/scarlet/readme.md | 4 |
8 files changed, 285 insertions, 2 deletions
diff --git a/keyboards/draytronics/daisy/config.h b/keyboards/draytronics/daisy/config.h new file mode 100644 index 000000000..b524f8902 --- /dev/null +++ b/keyboards/draytronics/daisy/config.h | |||
@@ -0,0 +1,112 @@ | |||
1 | /*Copyright 2021 Blake Drayson / Draytronics | ||
2 | |||
3 | Contact info@draytronics.co.uk | ||
4 | |||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | #pragma once | ||
20 | |||
21 | #include "config_common.h" | ||
22 | |||
23 | #define VENDOR_ID 0x4454 //DT for DrayTronics | ||
24 | #define PRODUCT_ID 0x4441 //DA for Daisy | ||
25 | #define DEVICE_VER 0x0100 //Version 1 | ||
26 | #define MANUFACTURER Draytronics | ||
27 | #define PRODUCT DAISY | ||
28 | |||
29 | /* key matrix size */ | ||
30 | #define MATRIX_ROWS 3 | ||
31 | #define MATRIX_COLS 4 | ||
32 | |||
33 | /* | ||
34 | * Keyboard Matrix Assignments | ||
35 | * | ||
36 | * Change this to how you wired your keyboard | ||
37 | * COLS: AVR pins used for columns, left to right | ||
38 | * ROWS: AVR pins used for rows, top to bottom | ||
39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
41 | * | ||
42 | */ | ||
43 | |||
44 | #define MATRIX_ROW_PINS { B0, C0, C1} | ||
45 | #define MATRIX_COL_PINS { C2, C3, C4, C5 } | ||
46 | #define UNUSED_PINS | ||
47 | |||
48 | #define ENCODERS_PAD_A { B1, D0 } | ||
49 | #define ENCODERS_PAD_B { B2, D1 } | ||
50 | /* COL2ROW, ROW2COL*/ | ||
51 | #define DIODE_DIRECTION COL2ROW | ||
52 | #define TAP_CODE_DELAY 10 | ||
53 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
54 | #define DEBOUNCE 5 | ||
55 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
56 | //#define MATRIX_HAS_GHOST | ||
57 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
58 | #define LOCKING_SUPPORT_ENABLE | ||
59 | /* Locking resynchronize hack */ | ||
60 | #define LOCKING_RESYNC_ENABLE | ||
61 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
62 | * This is useful for the Windows task manager shortcut (ctrl+shift+esc). | ||
63 | */ | ||
64 | //#define GRAVE_ESC_CTRL_OVERRIDE | ||
65 | /* | ||
66 | * Force NKRO | ||
67 | * | ||
68 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
69 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
70 | * makefile for this to work.) | ||
71 | * | ||
72 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
73 | * until the next keyboard reset. | ||
74 | * | ||
75 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
76 | * fully operational during normal computer usage. | ||
77 | * | ||
78 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
79 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
80 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
81 | * power-up. | ||
82 | * | ||
83 | */ | ||
84 | //#define FORCE_NKRO | ||
85 | /* | ||
86 | * Feature disable options | ||
87 | * These options are also useful to firmware size reduction. | ||
88 | */ | ||
89 | /* disable debug print */ | ||
90 | //#define NO_DEBUG | ||
91 | /* disable print */ | ||
92 | //#define NO_PRINT | ||
93 | /* disable action features */ | ||
94 | //#define NO_ACTION_LAYER | ||
95 | //#define NO_ACTION_TAPPING | ||
96 | //#define NO_ACTION_ONESHOT | ||
97 | /* disable these deprecated features by default */ | ||
98 | #define NO_ACTION_MACRO | ||
99 | #define NO_ACTION_FUNCTION | ||
100 | |||
101 | //Underglow | ||
102 | #define RGB_DI_PIN D4 // Underglow led pin | ||
103 | #ifdef RGB_DI_PIN | ||
104 | #define RGBLED_NUM 4 | ||
105 | #define RGBLIGHT_HUE_STEP 8 | ||
106 | #define RGBLIGHT_SAT_STEP 8 | ||
107 | #define RGBLIGHT_VAL_STEP 8 | ||
108 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
109 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
110 | /*== all animations enable ==*/ | ||
111 | #define RGBLIGHT_ANIMATIONS | ||
112 | #endif | ||
diff --git a/keyboards/draytronics/daisy/daisy.c b/keyboards/draytronics/daisy/daisy.c new file mode 100644 index 000000000..149cb3d0c --- /dev/null +++ b/keyboards/draytronics/daisy/daisy.c | |||
@@ -0,0 +1,19 @@ | |||
1 | /*Copyright 2021 Blake Drayson / Draytronics | ||
2 | |||
3 | Contact info@draytronics.co.uk | ||
4 | |||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | #include "daisy.h" | ||
diff --git a/keyboards/draytronics/daisy/daisy.h b/keyboards/draytronics/daisy/daisy.h new file mode 100644 index 000000000..f6f9b69d8 --- /dev/null +++ b/keyboards/draytronics/daisy/daisy.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /*Copyright 2021 Blake Drayson / Draytronics | ||
2 | |||
3 | Contact info@draytronics.co.uk | ||
4 | |||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | #pragma once | ||
20 | |||
21 | #define _x_ KC_NO | ||
22 | |||
23 | #include "quantum.h" | ||
24 | |||
25 | #define LAYOUT_daisy( \ | ||
26 | K00, K03, \ | ||
27 | K10, K11, K12, K13, \ | ||
28 | K20, K21, K22, K23 \ | ||
29 | ) { \ | ||
30 | { K00, _x_, _x_, K03, }, \ | ||
31 | { K10, K11, K12, K13, }, \ | ||
32 | { K20, K21, K22, K23, }, \ | ||
33 | } | ||
diff --git a/keyboards/draytronics/daisy/info.json b/keyboards/draytronics/daisy/info.json new file mode 100644 index 000000000..4fee49466 --- /dev/null +++ b/keyboards/draytronics/daisy/info.json | |||
@@ -0,0 +1,25 @@ | |||
1 | { | ||
2 | "keyboard_name": "Draytronics DAISY", | ||
3 | "url": "https://www.draytronics.co.uk/daisy", | ||
4 | "maintainer": "ghostseven", | ||
5 | "width": 4, | ||
6 | "height": 3, | ||
7 | "layouts": { | ||
8 | "LAYOUT": { | ||
9 | "layout": [ | ||
10 | {"label":"", "x":0, "y":0}, | ||
11 | {"label":"", "x":3, "y":0}, | ||
12 | |||
13 | {"label":"", "x":0, "y":1}, | ||
14 | {"label":"", "x":1, "y":1}, | ||
15 | {"label":"", "x":2, "y":1}, | ||
16 | {"label":"", "x":3, "y":1}, | ||
17 | |||
18 | {"label":"", "x":0, "y":2}, | ||
19 | {"label":"", "x":1, "y":2}, | ||
20 | {"label":"", "x":2, "y":2}, | ||
21 | {"label":"", "x":3, "y":1, "h":2} | ||
22 | ] | ||
23 | } | ||
24 | } | ||
25 | } | ||
diff --git a/keyboards/draytronics/daisy/keymaps/default/keymap.c b/keyboards/draytronics/daisy/keymaps/default/keymap.c new file mode 100644 index 000000000..396fcd9dd --- /dev/null +++ b/keyboards/draytronics/daisy/keymaps/default/keymap.c | |||
@@ -0,0 +1,51 @@ | |||
1 | /*Copyright 2021 Blake Drayson / Draytronics | ||
2 | |||
3 | Contact info@draytronics.co.uk | ||
4 | |||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | #include QMK_KEYBOARD_H | ||
20 | #define _BASE 0 // Base layer | ||
21 | #define _CODE 1 // Code layer | ||
22 | |||
23 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
24 | [_BASE] = LAYOUT_daisy( | ||
25 | KC_MUTE, KC_HOME, | ||
26 | MO(_CODE), KC_MPRV, KC_MNXT, KC_MPLY, | ||
27 | C(KC_LEFT), C(KC_UP), C(KC_DOWN), C(KC_RIGHT) | ||
28 | ), | ||
29 | [_CODE] = LAYOUT_daisy( | ||
30 | KC_MUTE, KC_END, | ||
31 | _______, RGB_MOD, RGB_VAI, RGB_TOG, | ||
32 | G(S(KC_5)), G(A(KC_ESC)), G(KC_F), RESET | ||
33 | ) | ||
34 | }; | ||
35 | |||
36 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
37 | if (index == 0) { | ||
38 | if (clockwise) { | ||
39 | tap_code(KC_VOLD); | ||
40 | } else { | ||
41 | tap_code(KC_VOLU); | ||
42 | } | ||
43 | } | ||
44 | else if (index == 1) { | ||
45 | if (clockwise) { | ||
46 | tap_code(KC_PGUP); | ||
47 | } else { | ||
48 | tap_code(KC_PGDN); | ||
49 | } | ||
50 | } | ||
51 | } | ||
diff --git a/keyboards/draytronics/daisy/readme.md b/keyboards/draytronics/daisy/readme.md new file mode 100644 index 000000000..6e8dd007a --- /dev/null +++ b/keyboards/draytronics/daisy/readme.md | |||
@@ -0,0 +1,20 @@ | |||
1 | # DAISY | ||
2 |  | ||
3 | |||
4 | An open source macro pad with rotary encoders and under glow, designed to be easily built with (mostly) through hole components. More info / kits / PCB designs available at [draytronics.co.uk/daisy](https://www.draytronics.co.uk/daisy) | ||
5 | |||
6 | * Keyboard Maintainer: [Blake Drayson](https://github.com/ghostseven) | ||
7 | * Hardware Supported: DAISY PCB / ATMega328P | ||
8 | * Hardware Availability: [draytronics.co.uk](https://draytronics.co.uk) | ||
9 | |||
10 | Make example for this keyboard (after setting up your build environment): | ||
11 | |||
12 | make draytronics/daisy:default | ||
13 | |||
14 | Flashing example for this keyboard: | ||
15 | |||
16 | make draytronics/daisy:default:flash | ||
17 | |||
18 | 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). | ||
19 | |||
20 | VIA design config file avaliable [here](https://www.draytronics.co.uk/f_daisy/draytronics_daisy_via_config.json) | ||
diff --git a/keyboards/draytronics/daisy/rules.mk b/keyboards/draytronics/daisy/rules.mk new file mode 100644 index 000000000..f826ee618 --- /dev/null +++ b/keyboards/draytronics/daisy/rules.mk | |||
@@ -0,0 +1,23 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega328p | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = USBasp | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
13 | CONSOLE_ENABLE = no # Console for debug | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
22 | AUDIO_ENABLE = no # Audio output | ||
23 | ENCODER_ENABLE = yes # Rotary encoder support | ||
diff --git a/keyboards/draytronics/scarlet/readme.md b/keyboards/draytronics/scarlet/readme.md index 4a548ec8d..a1ba2e330 100644 --- a/keyboards/draytronics/scarlet/readme.md +++ b/keyboards/draytronics/scarlet/readme.md | |||
@@ -2,11 +2,11 @@ | |||
2 | 2 | ||
3 |  | 3 |  |
4 | 4 | ||
5 | A open source 17 key numpad keyboard, designed to be easily built at home with through hole components. More info / kits / PCB designs available at [draytronics.co.uk/scarlet](draytronics.co.uk) | 5 | A open source 17 key numpad keyboard, designed to be easily built at home with through hole components. More info / kits / PCB designs available at [draytronics.co.uk/scarlet](https://draytronics.co.uk) |
6 | 6 | ||
7 | * Keyboard Maintainer: [Blake Drayson](https://github.com/ghostseven) | 7 | * Keyboard Maintainer: [Blake Drayson](https://github.com/ghostseven) |
8 | * Hardware Supported: SCARLET PCB / ATMega32A | 8 | * Hardware Supported: SCARLET PCB / ATMega32A |
9 | * Hardware Availability: [draytronics.co.uk](draytronics.co.uk) | 9 | * Hardware Availability: [draytronics.co.uk](https://draytronics.co.uk) |
10 | 10 | ||
11 | Make example for this keyboard (after setting up your build environment): | 11 | Make example for this keyboard (after setting up your build environment): |
12 | 12 | ||