Skip to content

Commit d2a630e

Browse files
authored
Merge pull request #2417 from adafruit/neokey_update
Adding delay
2 parents b8c1bce + 363678d commit d2a630e

File tree

1 file changed

+3
-2
lines changed
  • NeoKey_BFF_Examples/CP_Keyboard_Example

1 file changed

+3
-2
lines changed

NeoKey_BFF_Examples/CP_Keyboard_Example/code.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@
4343
switch_state = False
4444

4545
# if the button is pressed..
46-
if not switch.value and not switch_state:
47-
# neopixel brightness is 0.3 and rainbow animation is visible
46+
elif not switch.value and not switch_state:
4847
pixels.fill(pixel_color)
4948
pixels.show()
5049
keyboard.press(modifier_key, key)
5150
switch_state = True
51+
52+
time.sleep(0.05)

0 commit comments

Comments
 (0)