diff --git a/boot.py b/boot.py index 42b0e1d..6174dde 100644 --- a/boot.py +++ b/boot.py @@ -1,16 +1,16 @@ -# from board import * -# import digitalio -# import storage +from board import * +import digitalio +import storage -# noStorageStatus = False -# noStoragePin = digitalio.DigitalInOut(GP0) -# noStoragePin.switch_to_input(pull=digitalio.Pull.UP) -# noStorageStatus = not noStoragePin.value +noStorageStatus = False +noStoragePin = digitalio.DigitalInOut(GP15) +noStoragePin.switch_to_input(pull=digitalio.Pull.UP) +noStorageStatus = not noStoragePin.value -# if(noStorageStatus == False): -# # don't show USB drive to host PC -# storage.disable_usb_drive() -# print("Disabling USB drive") -# else: -# # normal boot -# print("USB drive enabled") +if(noStorageStatus == False): + # don't show USB drive to host PC + storage.disable_usb_drive() + print("Disabling USB drive") +else: + # normal boot + print("USB drive enabled") diff --git a/code.py b/code.py index b7fe888..d82b684 100644 --- a/code.py +++ b/code.py @@ -69,6 +69,7 @@ def play_pause(): consumer_control.send(ConsumerControlCode.PLAY_PAUSE) print('Play/Pause') +time.sleep(1) while True: if buttonPin.value == False: