11 lines
287 B
Python
11 lines
287 B
Python
import digitalio
|
|
import board
|
|
import storage
|
|
|
|
switch = digitalio.DigitalInOut(board.D0)
|
|
switch.direction = digitalio.Direction.INPUT
|
|
switch.pull = digitalio.Pull.UP
|
|
|
|
# If the D0 is connected to ground with a wire
|
|
# CircuitPython can write to the drive
|
|
storage.remount("/", switch.value)
|