extension for indicating layer status with leds
This commit is contained in:
committed by
Kyle Brown
parent
57ba0fe8b2
commit
fd30b7a8d8
46
docs/extension_statusled.md
Normal file
46
docs/extension_statusled.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Status LEDs
|
||||
|
||||
Indicate which layer you are on with ah array of single leds.
|
||||
|
||||
During startup the leds light up to indicte that the bootup is finished.
|
||||
|
||||
For the time being just a simple consecutive single led
|
||||
indicator. And when there are more layers than leds it
|
||||
wraps around to the first led again.
|
||||
(Also works for a single led, which just lights when any
|
||||
layer is active)
|
||||
|
||||
_Most of the code comes from the Mono color LED backlight extension_.
|
||||
|
||||
## Enabling the extension
|
||||
|
||||
To enable the extension you need to define a list of `led_pins`. It can be a list of a one, two or three pins.
|
||||
|
||||
```python
|
||||
from kmk.extensions.statusled import statusLED
|
||||
import board
|
||||
|
||||
statusLED = statusLED(led_pins=[board.GP0, board.GP1, board.GP2])
|
||||
keyboard.extensions.append(statusLED)
|
||||
```
|
||||
|
||||
## [Keycodes]
|
||||
|
||||
| Key | Aliases | Description |
|
||||
| ------------- | ------- | ------------------- |
|
||||
| `KC.SLED_INC` | | Increase Brightness |
|
||||
| `KC.SLED_DEC` | | Decrease Brightness |
|
||||
|
||||
## Configuration
|
||||
|
||||
All of these values can be set by default for when the keyboard boots.
|
||||
|
||||
```python
|
||||
from kmk.extensions.led import AnimationModes
|
||||
led_ext = LED(
|
||||
led_pin=led_pin,
|
||||
brightness=30,
|
||||
brightness_step=5,
|
||||
brightness_limit=100,
|
||||
)
|
||||
```
|
Reference in New Issue
Block a user