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:
|
||||
# Always remember to call keybow.update()!
|
||||
keybow.update()
|
||||
|
||||
# wenn layer-auswahl key gedrückt dann..
|
||||
if keys[0].pressed:
|
||||
# setze current layer
|
||||
current_layer = 0
|
||||
# färben zum layer gehörende tasten ein
|
||||
for n in nutzbare_tasten:
|
||||
keybow.keys[n].set_led(*colours[4])
|
||||
keybow.keys[n].set_led(*colours[0])
|
||||
elif keys[1].pressed:
|
||||
current_layer = 1
|
||||
for n in nutzbare_tasten:
|
||||
keybow.keys[n].set_led(*colours[4])
|
||||
keybow.keys[n].set_led(*colours[1])
|
||||
elif keys[2].pressed:
|
||||
current_layer = 2
|
||||
for n in nutzbare_tasten:
|
||||
keybow.keys[n].set_led(*colours[4])
|
||||
keybow.keys[n].set_led(*colours[2])
|
||||
elif keys[3].pressed:
|
||||
current_layer = 3
|
||||
for n in nutzbare_tasten:
|
||||
keybow.keys[n].set_led(*colours[4])
|
||||
keybow.keys[n].set_led(*colours[3])
|
||||
|
||||
# "frage" alle tasten ab
|
||||
for taste in layers[current_layer].keys():
|
||||
|
|
Loading…
Reference in a new issue