You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
devicetree error: binding controller <Node /behaviors/layer0_led_on in '/tmp/zmk-config/zephyr/misc/empty_file.c'> for <Node /macros/to_layer0 in '/tmp/zmk-config/zephyr/misc/empty_file.c'> lacks binding
Questions
What is the correct way to implement LED layer indicators in ZMK?
Is there a specific behavior type we should use for GPIO LED control?
Are there any example implementations we can reference?
Additional Context
We've tried various approaches including:
zmk,behavior-gpio
zmk,behavior-output
zmk,behavior-led-control
Direct GPIO references and LED node references
The goal is to have the corresponding LED turn on for the active layer while turning off the LEDs for other layers. Any guidance on the proper way to implement this functionality would be greatly appreciated!
The text was updated successfully, but these errors were encountered:
What is the correct way to implement LED layer indicators in ZMK?
A small module is probably what I'd go for for maintainability, but see the answers below.
Is there a specific behavior type we should use for GPIO LED control?
Backlight behavior can control GPIO LEDs (doesn't have to be PWM) but it doesn't support multiple different instances for different LEDs
Underglow only works for smart LED strips, not GPIO-based LEDs
External power control also works with toggling only one pin
So no, there is no good built-in solution to toggle multiple different GPIOs.
Are there any example implementations we can reference?
There is a community-based solution: @elpekenin's userspace has two functions that you can combine to achieve this:
A layer callbacks feature that triggers a listed behavior on layer on/off (another alternative here)
A behavior to control individual GPIOs called &gpio
The examples in the README combine the two to essentially create layer indicator LEDs.
As an aside, all the available behaviors are documented in the docs: https://zmk.dev/docs/keymaps/behaviors. The ones you tried don't exist, otherwise they'd be documented.
I am looking for some help to see if it's possible to Implement simple LED indicators to show which layer is currently active on a custom keyboard.
Hardware Setup
nice_nano_v2
P1.13 (GPIO1_13)
P0.09 (GPIO0_09)
P1.11 (GPIO1_11)
Current Implementation
LED Node Definition (
.overlay
)Behavior Attempt (
.keymap
)Configuration (
.conf
)Current Error
Questions
Additional Context
We've tried various approaches including:
zmk,behavior-gpio
zmk,behavior-output
zmk,behavior-led-control
The goal is to have the corresponding LED turn on for the active layer while turning off the LEDs for other layers. Any guidance on the proper way to implement this functionality would be greatly appreciated!
The text was updated successfully, but these errors were encountered: