mirror of
https://github.com/dbisu/pico-ducky.git
synced 2025-12-06 02:41:45 +00:00
Updated to check the DOWN button on boot
This commit is contained in:
7
boot.py
7
boot.py
@@ -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 :-)
|
||||
|
||||
Reference in New Issue
Block a user