Farben nutzbar passend zu auswahl
This commit is contained in:
parent
bacb410f1f
commit
9851f2290e
1 changed files with 4 additions and 5 deletions
|
@ -79,26 +79,25 @@ for n in nutzbare_tasten:
|
||||||
while True:
|
while True:
|
||||||
# Always remember to call keybow.update()!
|
# Always remember to call keybow.update()!
|
||||||
keybow.update()
|
keybow.update()
|
||||||
|
|
||||||
# wenn layer-auswahl key gedrückt dann..
|
# wenn layer-auswahl key gedrückt dann..
|
||||||
if keys[0].pressed:
|
if keys[0].pressed:
|
||||||
# setze current layer
|
# setze current layer
|
||||||
current_layer = 0
|
current_layer = 0
|
||||||
# färben zum layer gehörende tasten ein
|
# färben zum layer gehörende tasten ein
|
||||||
for n in nutzbare_tasten:
|
for n in nutzbare_tasten:
|
||||||
keybow.keys[n].set_led(*colours[4])
|
keybow.keys[n].set_led(*colours[0])
|
||||||
elif keys[1].pressed:
|
elif keys[1].pressed:
|
||||||
current_layer = 1
|
current_layer = 1
|
||||||
for n in nutzbare_tasten:
|
for n in nutzbare_tasten:
|
||||||
keybow.keys[n].set_led(*colours[4])
|
keybow.keys[n].set_led(*colours[1])
|
||||||
elif keys[2].pressed:
|
elif keys[2].pressed:
|
||||||
current_layer = 2
|
current_layer = 2
|
||||||
for n in nutzbare_tasten:
|
for n in nutzbare_tasten:
|
||||||
keybow.keys[n].set_led(*colours[4])
|
keybow.keys[n].set_led(*colours[2])
|
||||||
elif keys[3].pressed:
|
elif keys[3].pressed:
|
||||||
current_layer = 3
|
current_layer = 3
|
||||||
for n in nutzbare_tasten:
|
for n in nutzbare_tasten:
|
||||||
keybow.keys[n].set_led(*colours[4])
|
keybow.keys[n].set_led(*colours[3])
|
||||||
|
|
||||||
# "frage" alle tasten ab
|
# "frage" alle tasten ab
|
||||||
for taste in layers[current_layer].keys():
|
for taste in layers[current_layer].keys():
|
||||||
|
|
Loading…
Reference in a new issue