kmk_firmware/boards/pimoroni/keybow_2040/code.py

31 lines
588 B
Python
Raw Normal View History

2022-02-21 05:28:34 +01:00
from is31fl3731_pixelbuf import Keybow2040Leds
2022-02-21 02:34:44 +01:00
from keybow_2040 import Keybow2040
2022-02-21 05:28:34 +01:00
from kmk.extensions.rgb import RGB, AnimationModes
2022-02-21 02:34:44 +01:00
from kmk.keys import KC
2022-02-21 05:28:34 +01:00
rgb_ext = RGB(
pixel_pin=0,
pixels=Keybow2040Leds(16),
num_pixels=16,
animation_mode=AnimationModes.BREATHING_RAINBOW,
)
2022-02-21 02:34:44 +01:00
keybow = Keybow2040()
2022-02-21 05:28:34 +01:00
keybow.extensions = [rgb_ext]
2022-02-21 02:34:44 +01:00
# fmt: off
keybow.keymap = [
[
KC.A, KC.B, KC.C, KC.D,
KC.E, KC.F, KC.G, KC.H,
KC.I, KC.J, KC.K, KC.L,
KC.M, KC.N, KC.O, KC.P,
KC.Q
]
]
# fmt: on
if __name__ == '__main__':
keybow.go()