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 * from board import *
# import digitalio import digitalio
# import storage import storage
# noStorageStatus = False noStorageStatus = False
# noStoragePin = digitalio.DigitalInOut(GP0) noStoragePin = digitalio.DigitalInOut(GP15)
# noStoragePin.switch_to_input(pull=digitalio.Pull.UP) noStoragePin.switch_to_input(pull=digitalio.Pull.UP)
# noStorageStatus = not noStoragePin.value noStorageStatus = not noStoragePin.value
# if(noStorageStatus == False): if(noStorageStatus == False):
# # don't show USB drive to host PC # don't show USB drive to host PC
# storage.disable_usb_drive() storage.disable_usb_drive()
# print("Disabling USB drive") print("Disabling USB drive")
# else: else:
# # normal boot # normal boot
# print("USB drive enabled") print("USB drive enabled")

View File

@ -69,6 +69,7 @@ def play_pause():
consumer_control.send(ConsumerControlCode.PLAY_PAUSE) consumer_control.send(ConsumerControlCode.PLAY_PAUSE)
print('Play/Pause') print('Play/Pause')
time.sleep(1)
while True: while True:
if buttonPin.value == False: if buttonPin.value == False: