added sleep before loop

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-04-26 22:13:20 +02:00
parent d36c79ccd9
commit 8d064986ac
2 changed files with 15 additions and 14 deletions

28
boot.py
View File

@ -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")

View File

@ -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: