I'm setting up the boot.py to either make the CP volume writable by CP code or by the computer. Currently I'm using one of the touchpads on the clue board to detemine where the readwrite flag should be true or false but, since we're planning to have the clue.py code log data to the volume when it's running on battery power, I was thinking that might be a simpler way to set it up for the students to use.
The touchpad being touched or not doesn't seem to be all that reliable. It works but it sometimes takes one or two extra resets (via the reset button) to put it into readonly mode). Here's the current boot.py code if that's helpful:
Code: Select all
from adafruit_clue import clue
import storage
print("Running boot.py")
print(clue.touch_2)
if (clue.touch_2):
storage.remount("/", readonly=False)
print("Circuit Python code can write to CP Volume")
else:
storage.remount("/", readonly=True)
print("Host Computer can write to CP Volume")
print("Circuit Python code can only read from CP Volume")
Dave