Updated to check the DOWN button on boot

This commit is contained in:
Skickar
2021-12-11 01:03:39 -07:00
committed by GitHub
parent 391c402604
commit 809d545bbd

View File

@@ -1,9 +1,13 @@
from board import *
import digitalio
import storage
import board
import time
time.sleep(3)
noStorageStatus = False
noStoragePin = digitalio.DigitalInOut(GP15)
noStoragePin = digitalio.DigitalInOut(board.IO18) ## If the down button is pressed on the S2 Nugget
noStoragePin.switch_to_input(pull=digitalio.Pull.UP)
noStorageStatus = not noStoragePin.value
@@ -14,3 +18,4 @@ if(noStorageStatus == True):
else:
# normal boot
print("USB drive enabled")
# Write your code here :-)