Browse Source

Update 'CARDPUTER CircuitPython/boot.py'

cube 9 months ago
parent
commit
74efe3a9a5
1 changed files with 9 additions and 4 deletions
  1. 9
    4
      CARDPUTER CircuitPython/boot.py

+ 9
- 4
CARDPUTER CircuitPython/boot.py View File

@@ -1,10 +1,16 @@
1
+## FILE OBTAINED FROM: https://github.com/RetiredWizard/PyDOS/blob/main/cpython/boot.py
2
+## BECAUSE ! I cannot find anyone else who explains boot.py clearly enough to work for the Cardputer and Circuitpython
3
+## *specifically* for writing to the SD card!
4
+
5
+## Minor edits made to comments and print statements for relevance to Cardputer generally
6
+
1 7
 """CircuitPython Essentials Storage logging boot.py file"""
2 8
 from sys import implementation
3 9
 import board
4 10
 import digitalio
5 11
 import storage
6 12
 
7
-# The PyDOS file system will be set to Read/Write status for next
13
+# The file system will be set to Read/Write status for next
8 14
 # power cycle unless a control GPIO is grounded (GP2,5 or 6 depending on the Microcontroller)
9 15
 # in which case the host computer will have Read/Write access and PyDOS will have readonly access.
10 16
 
@@ -47,12 +53,11 @@ if swpin:
47 53
     if switch.value == False:
48 54
         # Mounts so Host computer can write to micro-flash
49 55
         storage.remount("/", True)
50
-        print("Switch False (pin grounded), PyDOS FS is ReadOnly")
56
+        print("Switch False (pin grounded), FS is ReadOnly")
51 57
     else:
52 58
         storage.remount("/", False)
53
-        print("Switch True (not grounded), PyDOS FS is ReadWrite")
59
+        print("Switch True (not grounded), FS is ReadWrite")
54 60
 
55 61
     switch.deinit()
56 62
 else:
57
-    print("If write access from the host is needed, enter the following PyDOS command:\nfs ro")
58 63
     storage.remount("/", False )