Skip to content

Commit bae3a09

Browse files
committed
Reset the display manually in pybadge
1 parent 7744365 commit bae3a09

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pybadge/ugame.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import stage
1010
import displayio
1111
import busio
12+
import time
1213

1314

1415
K_X = 0x02
@@ -51,7 +52,11 @@
5152
_tft_spi.configure(baudrate=24000000)
5253
_tft_spi.unlock()
5354
_fourwire = displayio.FourWire(_tft_spi, command=board.TFT_DC,
54-
chip_select=board.TFT_CS, reset=board.TFT_RST)
55+
chip_select=board.TFT_CS)
56+
_reset = digitalio.DigitalInOut(board.TFT_RST)
57+
_reset.switch_to_output(value=0)
58+
time.sleep(0.05)
59+
_reset.value = 1
5560
display = displayio.Display(_fourwire, _TFT_INIT, width=160, height=128,
5661
rotation=0, backlight_pin=board.TFT_LITE)
5762
del _TFT_INIT

0 commit comments

Comments
 (0)