Skip to content

Commit 2e31696

Browse files
committed
intitialize keboard in led_on example
1 parent 8ecfb14 commit 2e31696

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

adafruit_hid/keyboard.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ def led_on(self, led_code):
168168
from adafruit_hid.keycode import Keycode
169169
import time
170170
171+
# Initialize Keybaord
172+
kbd = Keyboard(usb_hid.devices)
173+
171174
# Press and release CapsLock.
172175
kbd.press(Keycode.CAPS_LOCK)
173176
time.sleep(.09)

0 commit comments

Comments
 (0)