Skip to content

Commit

Permalink
Reset the display manually in pybadge
Browse files Browse the repository at this point in the history
  • Loading branch information
deshipu committed May 8, 2019
1 parent 7744365 commit bae3a09
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pybadge/ugame.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import stage
import displayio
import busio
import time


K_X = 0x02
Expand Down Expand Up @@ -51,7 +52,11 @@
_tft_spi.configure(baudrate=24000000)
_tft_spi.unlock()
_fourwire = displayio.FourWire(_tft_spi, command=board.TFT_DC,
chip_select=board.TFT_CS, reset=board.TFT_RST)
chip_select=board.TFT_CS)
_reset = digitalio.DigitalInOut(board.TFT_RST)
_reset.switch_to_output(value=0)
time.sleep(0.05)
_reset.value = 1
display = displayio.Display(_fourwire, _TFT_INIT, width=160, height=128,
rotation=0, backlight_pin=board.TFT_LITE)
del _TFT_INIT
Expand Down

0 comments on commit bae3a09

Please sign in to comment.