Created
May 20, 2024 01:53
-
-
Save FaliqCytron/87e0a35b6f82fd0d66d0e11968dea800 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries | |
| # | |
| # SPDX-License-Identifier: MIT | |
| """ | |
| boot.py file for Pico data logging example. If pin GP0 is connected to GND when | |
| the pico starts up, make the filesystem writeable by CircuitPython. | |
| """ | |
| import board | |
| import digitalio | |
| import storage | |
| write_pin = digitalio.DigitalInOut(board.GP15) | |
| write_pin.direction = digitalio.Direction.INPUT | |
| write_pin.pull = digitalio.Pull.UP | |
| # If write pin is connected to ground on start-up, CircuitPython can write to CIRCUITPY filesystem. | |
| if not write_pin.value: | |
| storage.remount("/", readonly=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment