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 * from board import *
import digitalio import digitalio
import storage import storage
import board
import time
time.sleep(3)
noStorageStatus = False 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) noStoragePin.switch_to_input(pull=digitalio.Pull.UP)
noStorageStatus = not noStoragePin.value noStorageStatus = not noStoragePin.value
@@ -14,3 +18,4 @@ if(noStorageStatus == True):
else: else:
# normal boot # normal boot
print("USB drive enabled") print("USB drive enabled")
# Write your code here :-)