Skip to content

Commit 4380b22

Browse files
committed
Adding delay
Adding delay for debouncing
1 parent e0a0722 commit 4380b22

File tree

1 file changed

+2
-1
lines changed
  • NeoKey_BFF_Examples/CP_Keyboard_Example

1 file changed

+2
-1
lines changed

NeoKey_BFF_Examples/CP_Keyboard_Example/code.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@
4444

4545
# if the button is pressed..
4646
if not switch.value and not switch_state:
47-
# neopixel brightness is 0.3 and rainbow animation is visible
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)