Skip to content

Commit

Permalink
Add the Paintbrush with Ardux
Browse files Browse the repository at this point in the history
  • Loading branch information
smores56 committed Apr 23, 2024
1 parent 9f1d553 commit 7c385f6
Show file tree
Hide file tree
Showing 12 changed files with 808 additions and 5 deletions.
2 changes: 2 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ include:
shield: clog_left
- board: boardsource_blok
shield: clog_right
- board: boardsource_blok
shield: the_paintbrush_left
- board: nice_nano_v2
shield: settings_reset
- board: seeeduino_xiao_ble
Expand Down
558 changes: 558 additions & 0 deletions config/ardux.dtsi

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions config/boards/shields/the_paintbrush/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
if SHIELD_THE_PAINTBRUSH_LEFT || SHIELD_THE_PAINTBRUSH_RIGHT

config ZMK_KEYBOARD_NAME
default "The Paintbrush"

config I2C
default y

config SSD1306
default y

config SSD1306_REVERSE_MODE
default y

config LVGL_HOR_RES_MAX
default 128

config LVGL_VER_RES_MAX
default 32

config LVGL_VDB_SIZE
default 64

config LVGL_DPI
default 148

config LVGL_BITS_PER_PIXEL
default 1

choice LVGL_COLOR_DEPTH
default LVGL_COLOR_DEPTH_1
endchoice

endif
8 changes: 8 additions & 0 deletions config/boards/shields/the_paintbrush/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2021 Mike "KemoNine" Crosson
# SPDX-License-Identifier: MIT

config SHIELD_THE_PAINTBRUSH_LEFT
def_bool $(shields_list_contains,the_paintbrush_left)

config SHIELD_THE_PAINTBRUSH_RIGHT
def_bool $(shields_list_contains,the_paintbrush_right)
3 changes: 3 additions & 0 deletions config/boards/shields/the_paintbrush/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The Paintbrush

This directory contains the ARDUX implementation for `The Paintbrush` hardware being developed by KemoNine.
16 changes: 16 additions & 0 deletions config/boards/shields/the_paintbrush/the_paintbrush_left.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) 2021 Mike "KemoNine" Crosson
# SPDX-License-Identifier: MIT

# Tune combos to allow proper ARDUX support
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=16
CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=8
CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS=8

# Tune bluetooth profiles for quick select
CONFIG_BT_MAX_CONN=6

# Enable display (layer in use is helpful)
CONFIG_ZMK_DISPLAY=y

# Turn off sleep
CONFIG_ZMK_SLEEP=n
31 changes: 31 additions & 0 deletions config/boards/shields/the_paintbrush/the_paintbrush_left.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) 2021 Mike "KemoNine" Crosson
*
* SPDX-License-Identifier: MIT
*/

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

// Left/Right
#define ARDUX_LEFT 1

// ARTS Row
#define KEY_A 3
#define KEY_R 2
#define KEY_T 1
#define KEY_S 0
// EYIO Row
#define KEY_E 7
#define KEY_Y 6
#define KEY_I 5
#define KEY_O 4

// Define Offsets
#define LEADING_NONES NONE(0,0,0)
#define MIDDLE_NONES NONE(0, 0, 0)
#define TRAILING_NONES NONE(0, 0, 0)

// Include main ardux.io keymap
#include "../../../ardux.dtsi"
51 changes: 51 additions & 0 deletions config/boards/shields/the_paintbrush/the_paintbrush_left.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright (c) 2021 Mike "KemoNine" Crosson
*
* SPDX-License-Identifier: MIT
*/

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

&pro_micro_i2c {
status = "okay";

oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
label = "DISPLAY";
width = <128>;
height = <32>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <31>;
segment-remap;
com-invdir;
com-sequential;
prechargep = <0x22>;
};
};

/ {
chosen {
zmk,kscan = &kscan0;
zephyr,display = &oled;
};

kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-direct";

label = "KSCAN";

input-gpios
= <&pro_micro_a 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_a 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_a 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_a 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};
};
16 changes: 16 additions & 0 deletions config/boards/shields/the_paintbrush/the_paintbrush_right.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) 2021 Mike "KemoNine" Crosson
# SPDX-License-Identifier: MIT

# Tune combos to allow proper ARDUX support
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=16
CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=8
CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS=8

# Tune bluetooth profiles for quick select
CONFIG_BT_MAX_CONN=6

# Enable display (layer in use is helpful)
CONFIG_ZMK_DISPLAY=y

# Turn off sleep
CONFIG_ZMK_SLEEP=n
31 changes: 31 additions & 0 deletions config/boards/shields/the_paintbrush/the_paintbrush_right.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) 2021 Mike "KemoNine" Crosson
*
* SPDX-License-Identifier: MIT
*/

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

// Left/Right
#define ARDUX_RIGHT 1

// ARTS Row
#define KEY_A 0
#define KEY_R 1
#define KEY_T 2
#define KEY_S 3
// EYIO Row
#define KEY_E 4
#define KEY_Y 5
#define KEY_I 6
#define KEY_O 7

// Define Offsets
#define LEADING_NONES NONE(0,0,0)
#define MIDDLE_NONES NONE(0, 0, 0)
#define TRAILING_NONES NONE(0, 0, 0)

// Include main ardux.io keymap
#include "../../../ardux.dtsi"
52 changes: 52 additions & 0 deletions config/boards/shields/the_paintbrush/the_paintbrush_right.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright (c) 2021 Mike "KemoNine" Crosson
*
* SPDX-License-Identifier: MIT
*/

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

&pro_micro_i2c {
status = "okay";

oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
label = "DISPLAY";
width = <128>;
height = <32>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <31>;
segment-remap;
com-invdir;
com-sequential;
prechargep = <0x22>;
};
};

/ {
chosen {
zmk,kscan = &kscan0;
zephyr,display = &oled;
};

kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-direct";

label = "KSCAN";

input-gpios
= <&pro_micro_a 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_a 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_a 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_a 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;

};
};
11 changes: 6 additions & 5 deletions config/west.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
manifest:
remotes:
- name: petejohanson
url-base: https://github.com/petejohanson
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
- name: zmk-ardux
url-base: https://github.com/arduxio
projects:
- name: zmk
remote: petejohanson
revision: hardware/rp2040-support
remote: zmkfirmware
import: app/west.yml
self:
path: config
path: config

0 comments on commit 7c385f6

Please sign in to comment.