Skip to content

Commit 2c868f0

Browse files
Disable screen auto-refresh for quicker response
1 parent c6d381f commit 2c868f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Macropad_Hotkeys/code.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,18 @@ def switch(self):
7575
PIXELS[i] = 0
7676
GROUP[i].text = ''
7777
PIXELS.show()
78+
DISPLAY.refresh()
7879

7980

8081
# INITIALIZATION -----------------------
8182

8283
DISPLAY = board.DISPLAY
84+
DISPLAY.auto_refresh = False
8385
ENCODER = rotaryio.IncrementalEncoder(board.ENCODER_B, board.ENCODER_A)
8486
PIXELS = neopixel.NeoPixel(board.NEOPIXEL, 12, auto_write=False)
8587
KEYBOARD = Keyboard(usb_hid.devices)
8688
LAYOUT = KeyboardLayoutUS(KEYBOARD)
8789

88-
8990
GROUP = displayio.Group(max_size=14)
9091
for KEY_INDEX in range(12):
9192
x = KEY_INDEX % 3

0 commit comments

Comments
 (0)