Skip to content

Commit afedc64

Browse files
committed
Fix screen shot function but disable for now
Remove completely after screenshots are made for the guide
1 parent 7ead045 commit afedc64

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Minesweep/code.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import time
1616
import board
17+
import digitalio
1718
import displayio
1819
import adafruit_imageload
1920
import adafruit_touchscreen
@@ -43,7 +44,7 @@
4344
BOMBQUESTION = 13
4445
BOMBREVEALED = 14
4546

46-
snapshot = Debouncer(board.D4)
47+
snapshot = Debouncer(digitalio.DigitalInOut(board.D4))
4748

4849
sprite_sheet, palette = adafruit_imageload.load("/SpriteSheet.bmp",
4950
bitmap=displayio.Bitmap,
@@ -146,8 +147,9 @@ def play_a_game():
146147
while True:
147148
now = time/monotonic()
148149
snapshot.update()
149-
if snapshot.fell:
150-
save_pixels()
150+
# if snapshot.fell:
151+
# save_pixels()
152+
# continue
151153
if now >= touch_time:
152154
touch_time = now + 0.1
153155
touch_at = touchscreen.touch_point

0 commit comments

Comments
 (0)