documents/keyboards/zmk.md
Table of Contents
ZMK
https://github.com/zmkfirmware/zmk/issues/72 https://github.com/t4corun/zmk-config/blob/master/T4CORUN/mouse.dtsi
https://github.com/zmkfirmware/zmk/issues/1474
setup
# clone project
git clone git@github.com:EnotionZ/zmk.git
cd zmk
# create virtual environment
python -m venv .venv
source .venv/bin/activate # unix
.venv\Scripts\Activate.ps1 # powershell
.venv\Scripts\activate.bat # bash
pip install west
# initialize in app folder
west init -l app/
west update
# Export Zephy CMake package. This allows CMake to automatically load boilerplate code required for building Zephyr applications.
west zephy-export
# install Zephyr dependencies
pip install -r zephyr/scripts/requirements-base.txt
build
# use --pristine or -p when building a new board
west build -p -b nice_nano_v2 -s ./app -- -DSHIELD=dom4x6_left
# by default, build command outputs a single zmk.uf2 file
# for split boards, to avoid pristine & overriding, build separate left & right
west build -d build/left -b nice_nano_v2 -s ./app -- -DSHIELD=dom4x6_left
west build -d build/right -b nice_nano_v2 -s ./app -- -DSHIELD=dom4x6_right
download built file
scp dominick@z.dph.am:~/Work/zmk/build/zephyr/zmk.uf2 .
Extra Pins
Instead of using friendly names, use gpio pins directly. Example
Power Profile
https://zmk.dev/power-profiler 70% asleep Central: 7 months 2 weeks (+- 2 months) Peripheral: 1 year 2 months (+- 4 months) ZMK has eager debouncing, 7.5ms polling over BLE, 1ms polling over fast USB recharge rate is 100mA, so a 2,000mAh battery will take 20 hours to charge
Nice! Nano v2
- nRF52840 chip on board with 1MB of Flash and 256KB of RAM
- Programmable indicator (blue) LED as well as a charging indicator (orange) LED
- 3 extra GPIO pins offering a total of 21 GPIO pins
- 3.3V out of the VCC pin to power external features
- 32.768 kHz oscillator on board for real-time clock capabilities
Kyria
ZMK uses the blue color coded "Arduino" pin names to generate devicetree node references. https://zmk.dev/assets/images/pinout-4ed4b6eb1e452a7be44c3a0143cd5605.png