NeoMatrix/boot.py
2025-02-26 09:08:29 +01:00

10 lines
No EOL
253 B
Python

import board
import storage
import touchio
touch = touchio.TouchIn(board.GP28)
# Disable devices only if button is not pressed.
if touch.raw_value < 1500:
print(f"boot: button not pressed, disabling drive")
storage.disable_usb_drive()