File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 11import board
22from digitalio import DigitalInOut , Direction , Pull
3- import adafruit_dotstar as dotstar
3+ import usb_hid
44from adafruit_hid .keyboard import Keyboard
55from adafruit_hid .keycode import Keycode
66from adafruit_hid .keyboard_layout_us import KeyboardLayoutUS
77
8- dot = dotstar .DotStar (board .APA102_SCK , board .APA102_MOSI , 1 , brightness = 0.2 )
9- dot [0 ] = (0 , 0 , 0 )
10-
11- kbd = Keyboard ()
8+ kbd = Keyboard (usb_hid .devices )
129kbdLayout = KeyboardLayoutUS (kbd )
1310state = []
1411pins = {}
5855 for oldID in oldState :
5956 if not oldID in newState :
6057 kbd .release (buttonIDtoKeycode [oldID ])
61- dot [0 ] = (0 , 0 , 0 )
6258 if newBtn :
6359 kbd .press (buttonIDtoKeycode [newBtn ])
64- dot [0 ] = (255 , 0 , 0 )
6560 state = newState
61+
You can’t perform that action at this time.
0 commit comments