Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions micropython/examples/gfx_pack/button_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ def clear():

# set up
display.set_font("bitmap8")
if machine.mem32[0x40064008] & (1<<16): # Has the reset button been pressed
gp.set_backlight(0, 128, 128, 0)
clear()
display.text("Reset button pressed", 0, 0, WIDTH, 2)
display.update()
time.sleep(1)

while True:
if gp.switch_pressed(SWITCH_A): # if a button press is detected... # clear to black
Expand Down