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

Helix (4 row) #585

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
14 changes: 8 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Build
on:
push:
paths:
- ".github/workflows/build.yml"
- "app/**"
- '.github/workflows/build.yml'
- 'app/**'
pull_request:
paths:
- ".github/workflows/build.yml"
- "app/**"
- '.github/workflows/build.yml'
- 'app/**'

jobs:
build:
Expand All @@ -34,6 +34,8 @@ jobs:
- eek
- helix_left
- helix_right
- helix_4_left
- helix_4_right
- iris_left
- iris_right
- jian_left
Expand All @@ -60,7 +62,7 @@ jobs:
- splitreus62_right
- tg4x
- tidbit
cmake-args: [""]
cmake-args: ['']
include:
- board: bdn9_rev2
- board: dz60rgb_rev1
Expand Down Expand Up @@ -124,7 +126,7 @@ jobs:
if: ${{ !matrix.skip-archive }}
uses: actions/upload-artifact@v2
with:
name: "${{ steps.variables.outputs.artifact-name }}"
name: '${{ steps.variables.outputs.artifact-name }}'
path: |
build/zephyr/zmk.hex
build/zephyr/zmk.uf2
Expand Down
39 changes: 39 additions & 0 deletions app/boards/shields/helix_4/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright (c) 2021 The ZMK Contributors
# SPDX-License-Identifier: MIT

maxdubrinsky marked this conversation as resolved.
Show resolved Hide resolved
if SHIELD_HELIX_4_LEFT

config ZMK_KEYBOARD_NAME
default "Helix"

config ZMK_SPLIT_BLE_ROLE_CENTRAL
default y

endif

if SHIELD_HELIX_4_RIGHT

config ZMK_KEYBOARD_NAME
default "Helix Right"

config USB
default y

endif

if SHIELD_HELIX_4_LEFT || SHIELD_HELIX_4_RIGHT

config ZMK_SPLIT
default y

# config DEVICE_POWER_MANAGEMENT
# default y

if ZMK_RGB_UNDERGLOW

config WS2812_STRIP
default y
Comment on lines +34 to +35
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is neat. I like it.


endif # ZMK_RGB_UNDERGLOW

endif
8 changes: 8 additions & 0 deletions app/boards/shields/helix_4/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2021 The ZMK Contributors
# SPDX-License-Identifier: MIT

config SHIELD_HELIX_4_LEFT
def_bool $(shields_list_contains,helix_4_left)

config SHIELD_HELIX_4_RIGHT
def_bool $(shields_list_contains,helix_4_right)
34 changes: 34 additions & 0 deletions app/boards/shields/helix_4/boards/nice_nano.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <5>;
miso-pin = <7>;

led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";

/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;

/* WS2812 */
chain-length = <25>;
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
};
};

/ {
chosen {
zmk,underglow = &led_strip;
};
};
4 changes: 4 additions & 0 deletions app/boards/shields/helix_4/helix_4.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2021 The ZMK Contributors
# SPDX-License-Identifier: MIT

# CONFIG_ ZMK_RGB_UNDERGLOW=y
57 changes: 57 additions & 0 deletions app/boards/shields/helix_4/helix_4.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <dt-bindings/zmk/matrix_transform.h>

/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};

default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <14>;
rows = <4>;

map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13)
>;
};

kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";

diode-direction = "col2row";
row-gpios
= <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
};

&pro_micro_i2c {
status = "okay";

ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
label = "DISPLAY";
width = <128>;
height = <32>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <63>;
prechargep = <0x22>;
};
};
56 changes: 56 additions & 0 deletions app/boards/shields/helix_4/helix_4.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>

#define DEFAULT 0
#define LWR 1
#define RSE 2
#define ADJ 3

/ {
keymap {
compatible = "zmk,keymap";

default_layer {
bindings = <
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RET
&mo ADJ &kp LCTRL &kp LALT &kp LGUI &mo LWR &kp SPACE &kp SPACE &kp SPACE &kp SPACE &mo RSE &kp LEFT &kp UP &kp DOWN &kp RIGHT
>;
};

lower_layer {
bindings = <
&kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &trans
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBRC &kp RBRC &kp GRAVE
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &trans &kp PIPE &trans
&trans &trans &trans &trans &trans &trans &none &trans &trans &trans &kp HOME &kp PG_DN &kp PG_UP &kp END
>;
};

raise_layer {
bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBKT &kp RBKT &kp RALT
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &none &trans &trans &kp BSLH &kp RSHFT
&trans &trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &trans &kp RGUI
>;
};

adjust_layer {
bindings = <
&trans &reset &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DEL
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};
};
};
19 changes: 19 additions & 0 deletions app/boards/shields/helix_4/helix_4_left.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include "helix_4.dtsi"

&kscan0 {
col-gpios
= <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 16 GPIO_ACTIVE_HIGH>
;
};
24 changes: 24 additions & 0 deletions app/boards/shields/helix_4/helix_4_right.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include "helix_4.dtsi"

&default_transform {
col-offset = <7>;
};

&kscan0 {
col-gpios
= <&pro_micro_d 16 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
;
};

6 changes: 3 additions & 3 deletions docs/static/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ Write-Host "Keyboard Shield Selection:"
$prompt = "Pick a keyboard"

# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos.
$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!", "BFO-9000", "Helix"
$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek", "bfo9000", "helix"
$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n", "n", "y"
$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!", "BFO-9000", "Helix", "Helix 4 Row"
$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek", "bfo9000", "helix", "helix_4"
$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n", "n", "y", "y"

$choice = Get-Choice-From-Options -Options $options -Prompt $prompt
$shield_title = $($options[$choice])
Expand Down
9 changes: 9 additions & 0 deletions docs/static/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,15 @@ echo ""
echo "Keyboard Shield Selection:"

prompt="Pick an keyboard:"
<<<<<<< HEAD
<<<<<<< HEAD
options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "NIBBLE" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "BFO-9000" "Helix")
=======
options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "NIBBLE" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "BF0-9000" "Helix (5)" "Helix (4)")
>>>>>>> 66d3d70 (fix setup script)
=======
options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "NIBBLE" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "BF0-9000" "Helix" "Helix 4 Row")
>>>>>>> 48fdb31 (make requested changes)

PS3="$prompt "
# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos.
Expand Down Expand Up @@ -121,6 +129,7 @@ select opt in "${options[@]}" "Quit"; do
19 ) shield_title="Eek!" shield="eek"; split="n" break;;
20 ) shield_title="BFO-9000" shield="bfo9000"; split="y"; break;;
21 ) shield_title="Helix" shield="helix"; split="y"; break;;
22 ) shield_title="Helix 4 Row" shield="helix_4"; split="y"; break;;

# Add link to docs on adding your own custom shield in your ZMK config!
# $(( ${#options[@]}+1 )) ) echo "Other!"; break;;
Expand Down