1 Commits

Author SHA1 Message Date
Cole Smith
58a7f04d00 added draculad keyboard 2023-01-25 12:46:53 -08:00
11 changed files with 120 additions and 77 deletions

24
boards/draculad/README.md Normal file
View File

@@ -0,0 +1,24 @@
# Draculad
The Draculad is is a feature-packed 30% split columnar staggered keyboard.
Retailers (USA)
[Boardsource](https://boardsource.xyz/store)
Extensions enabled by default
- [Layers](/docs/en/layers.md) Need more keys than switches? Use layers.
- [ModTap](/docs/en/modtap.md) Allows mod keys to act as different keys when tapped.
- [Split](/docs/en/split_keyboards.md) Connects halves using a wire
- [peg_RGB_matrix](/docs/en/peg_rgb_matrix.md) Allows mod keys to act as different keys when tapped.
- [peg_oled_display](/docs/en/peg_oled_display.md) Connects halves using a wire
Common Extensions
- [Power](/docs/enpower.md) Powersaving features for battery life
## Microcontroller support
Update this line in `kb.py` to any supported microcontroller in `kmk/quickpin/pro_micro`:
```python
from kmk.quickpin.pro_micro.boardsource_blok import pinout as pins
```

69
boards/draculad/kb.py Normal file
View File

@@ -0,0 +1,69 @@
import board
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
from kmk.quickpin.pro_Micro.avr_promicro import translate as avr
from kmk.quickpin.pro_micro.boardsource_blok import pinout as pins
from kmk.scanners import DiodeOrientation
# from kmk.scanners.encoder import RotaryioEncoder
from kmk.scanners.keypad import MatrixScanner
class KMKKeyboard(_KMKKeyboard):
def __init__(self):
# create and register the scanner
self.matrix = [
MatrixScanner(
# required arguments:
column_pins = self.col_pins,
row_pins = self.row_pins,
# optional arguments with defaults:
columns_to_anodes=DiodeOrientation.COL2ROW,
interval=0.02,
max_events=64
),
# RotaryioEncoder(
# pin_a=self.pin_a1,
# pin_b=self.pin_b1,
# # optional
# divisor=4,
# ),
# RotaryioEncoder(
# pin_a=self.pin_a2,
# pin_b=self.pin_b2,
# # optional
# divisor=4,
# )
]
col_pins = (
pins[avr["F4"]],
pins[avr["F5"]],
pins[avr["F6"]],
pins[avr["F7"]],
pins[avr["B1"]],
)
row_pins = (pins[avr["D4"]], pins[avr["C6"]], pins[avr["D7"]], pins[avr["E6"]])
data_pin = pins[avr["D2"]]
rgb_pixel_pin = pins[avr["D3"]]
rgb_num_pixels = 20
i2c = board.I2C
SCL=pins[5]
SDA=pins[4]
pin_a1=pins[avr["B2"]]
pin_a2=pins[avr["B4"]]
pin_b1=pins[avr["B6"]]
pin_b2=pins[avr["B5"]]
led_key_pos=[
5,6,7,8,9,19,18,17,16,15,14,13,12,11,10,0,1,2,3,4
]
brightness_limit = 1.0
num_pixels = 20
# NOQA
# flake8: noqa
# fmt: off
coord_mapping = [
0, 1, 2, 3, 4, 24, 23, 22, 21, 20,
5, 6, 7, 8, 9, 29, 28, 27, 26, 25,
10, 11, 12, 13, 14, 34, 33, 32, 31, 30,
17, 18, 19, 39, 36, 35,
]

View File

@@ -1,22 +1,34 @@
from kb import KMKKeyboard from kb import KMKKeyboard
from kmk.extensions.peg_oled_Display import (
Oled,
OledData,
OledDisplayMode,
OledReactionType,
)
from kmk.extensions.peg_rgb_matrix import Rgb_matrix from kmk.extensions.peg_rgb_matrix import Rgb_matrix
from kmk.extensions.rgb import RGB
from kmk.keys import KC from kmk.keys import KC
from kmk.modules.layers import Layers from kmk.modules.layers import Layers
from kmk.modules.modtap import ModTap
from kmk.modules.split import Split
keyboard = KMKKeyboard() keyboard = KMKKeyboard()
keyboard.debug_enable=True
# Adding extensions modtap = ModTap()
# ledmap
rgb_ext = Rgb_matrix(ledDisplay=[[55,55,55],[55,55,55],[55,55,55],[55,55,55],[55,55,55],[55,55,55],[55,55,55],[55,55,55],[55,55,55]],split=False,rightSide=False,disable_auto_write=True)
# ledmap
layers_ext = Layers() layers_ext = Layers()
keyboard.modules.append(layers_ext) keyboard.modules.append(layers_ext)
keyboard.modules.append(modtap)
# oled
oled_ext = Oled(OledData(corner_one={0:OledReactionType.STATIC,1:["1 2 3 4 5 6","","","","","","",""]},corner_two={0:OledReactionType.STATIC,1:[" 7 8 Layer","","","","","",""," 7 8 Layer"]},corner_three={0:OledReactionType.LAYER,1:["^"," ^"," ^"," ^"," ^"," ^","",""]},corner_four={0:OledReactionType.LAYER,1:["","","","","",""," ^"," ^"]}),toDisplay=OledDisplayMode.TXT,flip= True)
# oled
keyboard.extensions.append(oled_ext)
# ledmap
rgb_ext = Rgb_matrix(ledDisplay=[[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255],[255,255,255]],split=True,rightSide=False,disable_auto_write=True)
# ledmap
keyboard.extensions.append(rgb_ext) keyboard.extensions.append(rgb_ext)
split = Split(use_pio=True)
# Cleaner key names keyboard.modules.append(split)
_______ = KC.TRNS _______ = KC.TRNS
XXXXXXX = KC.NO XXXXXXX = KC.NO
@@ -28,22 +40,25 @@ keyboard.keymap = [
KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P,\ KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P,\
KC.A, KC.S, KC.D, KC.F, KC.G, KC.H, KC.J, KC.K, KC.L, KC.SCLN,\ KC.A, KC.S, KC.D, KC.F, KC.G, KC.H, KC.J, KC.K, KC.L, KC.SCLN,\
KC.Z, KC.X, KC.C, KC.V, KC.B, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSH,\ KC.Z, KC.X, KC.C, KC.V, KC.B, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSH,\
LOWER, KC.SPC, KC.BSPC, RAISE KC.LCTL, LOWER, KC.SPC, KC.BSPC, RAISE, KC.ENT
], ],
[ #RAISE [ #RAISE
KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0,\ KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0,\
KC.TAB, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT, XXXXXXX, KC.MINS, KC.EQL, KC.LBRC, KC.RBRC,\ KC.TAB, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT, XXXXXXX, KC.MINS, KC.EQL, KC.LBRC, KC.RBRC,\
KC.LCTL, KC.GRV, KC.LGUI, KC.LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.BSLS, KC.QUOT,\ KC.LCTL, KC.GRV, KC.LGUI, KC.LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.BSLS, KC.QUOT,\
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
], ],
[ #LOWER [ #LOWER
KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN,\ KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN,\
KC.ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.UNDS, KC.PLUS, KC.LCBR, KC.RCBR,\ KC.ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.UNDS, KC.PLUS, KC.LCBR, KC.RCBR,\
KC.CAPS, KC.TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.PIPE, KC.DQT,\ KC.CAPS, KC.TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.PIPE, KC.DQT,\
XXXXXXX, XXXXXXX, KC.ENT, KC.DEL XXXXXXX, XXXXXXX, XXXXXXX, KC.ENT, XXXXXXX, KC.DEL
] ]
] ]
if __name__ == '__main__': if __name__ == '__main__':
keyboard.go() keyboard.go()

View File

@@ -1,28 +0,0 @@
# Reviung34
The Reviung34 is a 34 key keyboard designed by gtips, it is a slightly smaller
version of the popular Reviung 39. These "split non-split" keyboards offer a lot
of features split keyboards have in terms of comfort and ergonomics but do so in
a single-piece package. Many people consider keyboards in this style easier to
travel with since you don't have to manage two halves and there is of course no
need for a TRRS cable. This board sits somewhere between and Atreus and Corne,
and it is extremely comfortable to use.
Hardware Availability: [PCB & Case Data](https://github.com/gtips/reviung/tree/master)
Retailers (USA)
[Boardsource](https://boardsource.xyz/store)
Extensions enabled by default
- [Layers](/docs/en/layers.md) Need more keys than switches? Use layers.
- [RGB matrix](/docs/en/peg_rgb_matrix.md) Light it up
## Microcontroller support
Update this line in `kb.py` to any supported microcontroller in `kmk/quickpin/pro_micro`:
```python
from kmk.quickpin.pro_micro.boardsource_blok import pinout as pins

View File

@@ -1,37 +0,0 @@
import board
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
from kmk.quickpin.pro_micro.boardsource_blok import pinout as pins
from kmk.scanners import DiodeOrientation
from kmk.scanners import intify_coordinate as ic
class KMKKeyboard(_KMKKeyboard):
row_pins = (
pins[19],
pins[18],
pins[17],
pins[16]
)
col_pins = (
pins[6],
pins[7],
pins[8],
pins[9],
pins[10],
pins[15],
pins[14],
pins[13],
pins[12],
)
diode_orientation = DiodeOrientation.COLUMNS
rgb_pixel_pin = pins[0]
rgb_num_pixels = 9
led_key_pos = [0,1,2,3,8,4,5,6,7]
brightness_limit = 1.0
num_pixels = 9
coord_mapping = [
0, 1, 2, 3, 4, 5, 6, 7, 8, 32
,9, 10, 11, 12, 13, 14, 15, 16, 17, 33
,18,19, 20, 21, 22, 23, 24, 25, 26, 34
,29,30,31,35]