weiß als Farbe
This commit is contained in:
parent
f9ef3df8c9
commit
bacb410f1f
1 changed files with 7 additions and 22 deletions
|
@ -66,14 +66,15 @@ taste_ausgelöst = False
|
|||
colours = {0: (247, 253, 4),
|
||||
1: (249, 178, 8),
|
||||
2: (249, 132, 4),
|
||||
3: (252, 84, 4)}
|
||||
3: (252, 84, 4),
|
||||
4: (255,155,255)} # weiß
|
||||
# setze farben auf layer keys und den nutzbaren tasten nach dem start
|
||||
keybow.keys[0].set_led(*colours[0])
|
||||
keybow.keys[1].set_led(*colours[1])
|
||||
keybow.keys[2].set_led(*colours[2])
|
||||
keybow.keys[3].set_led(*colours[3])
|
||||
for n in nutzbare_tasten:
|
||||
keybow.keys[n].set_led(255,155,255)
|
||||
keybow.keys[n].set_led(*colours[4])
|
||||
|
||||
while True:
|
||||
# Always remember to call keybow.update()!
|
||||
|
@ -85,35 +86,19 @@ while True:
|
|||
current_layer = 0
|
||||
# färben zum layer gehörende tasten ein
|
||||
for n in nutzbare_tasten:
|
||||
keybow.keys[n].set_led(*colours[current_layer])
|
||||
keybow.keys[0].set_led(*colours[current_layer])
|
||||
keybow.keys[1].set_led(255, 255, 255)
|
||||
keybow.keys[2].set_led(255, 255, 255)
|
||||
keybow.keys[3].set_led(255, 255, 255)
|
||||
keybow.keys[n].set_led(*colours[4])
|
||||
elif keys[1].pressed:
|
||||
current_layer = 1
|
||||
for n in nutzbare_tasten:
|
||||
keybow.keys[n].set_led(*colours[current_layer])
|
||||
keybow.keys[0].set_led(255, 255, 255)
|
||||
keybow.keys[1].set_led(*colours[current_layer])
|
||||
keybow.keys[2].set_led(255, 255, 255)
|
||||
keybow.keys[3].set_led(255, 255, 255)
|
||||
keybow.keys[n].set_led(*colours[4])
|
||||
elif keys[2].pressed:
|
||||
current_layer = 2
|
||||
for n in nutzbare_tasten:
|
||||
keybow.keys[n].set_led(*colours[current_layer])
|
||||
keybow.keys[0].set_led(255, 255, 255)
|
||||
keybow.keys[1].set_led(255, 255, 255)
|
||||
keybow.keys[2].set_led(*colours[current_layer])
|
||||
keybow.keys[3].set_led(255, 255, 255)
|
||||
keybow.keys[n].set_led(*colours[4])
|
||||
elif keys[3].pressed:
|
||||
current_layer = 3
|
||||
for n in nutzbare_tasten:
|
||||
keybow.keys[n].set_led(*colours[current_layer])
|
||||
keybow.keys[0].set_led(255, 255, 255)
|
||||
keybow.keys[1].set_led(255, 255, 255)
|
||||
keybow.keys[2].set_led(255, 255, 255)
|
||||
keybow.keys[3].set_led(*colours[current_layer])
|
||||
keybow.keys[n].set_led(*colours[4])
|
||||
|
||||
# "frage" alle tasten ab
|
||||
for taste in layers[current_layer].keys():
|
||||
|
|
Loading…
Reference in a new issue