Created
February 21, 2022 14:41
-
-
Save baskaufs/7690e84ae5869b0b1a79e09053a83663 to your computer and use it in GitHub Desktop.
boot script for switch-based control of QT Py RP2040 memory read/write
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import board | |
import digitalio | |
import storage | |
switch = digitalio.DigitalInOut(board.D0) | |
switch.direction = digitalio.Direction.INPUT | |
switch.pull = digitalio.Pull.UP | |
# Connecting D0 to ground makes switch.value False | |
storage.remount("/", switch.value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment