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 1
1
import board
2
2
from digitalio import DigitalInOut , Direction , Pull
3
- import adafruit_dotstar as dotstar
3
+ import usb_hid
4
4
from adafruit_hid .keyboard import Keyboard
5
5
from adafruit_hid .keycode import Keycode
6
6
from adafruit_hid .keyboard_layout_us import KeyboardLayoutUS
7
7
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 )
12
9
kbdLayout = KeyboardLayoutUS (kbd )
13
10
state = []
14
11
pins = {}
58
55
for oldID in oldState :
59
56
if not oldID in newState :
60
57
kbd .release (buttonIDtoKeycode [oldID ])
61
- dot [0 ] = (0 , 0 , 0 )
62
58
if newBtn :
63
59
kbd .press (buttonIDtoKeycode [newBtn ])
64
- dot [0 ] = (255 , 0 , 0 )
65
60
state = newState
61
+
You can’t perform that action at this time.
0 commit comments