microReticulumTbeam/exercises/04_SD_card
2026-02-14 10:10:31 -08:00
..
src Modified by ChatGPT for migration to microRecticulum_Firmware, not verified by me... yet, but I am preserving to document this stage. 2026-02-14 10:10:31 -08:00
platformio.ini Modified by ChatGPT for migration to microRecticulum_Firmware, not verified by me... yet, but I am preserving to document this stage. 2026-02-14 10:10:31 -08:00
README.md RTC keeps time between POWER OFF & ON, SD Card at start still needs work -- if card is in the slot, it is not readable until it is pulled on and then inserted. 2026-02-13 18:52:17 -08:00

Exercise 04: SD Card

This exercise loops forever. Each cycle:

  1. Prints Sleeping 10 seconds and waits 10 seconds.
  2. Detects and mounts the SD card.
  3. Prints card and filesystem info (type/size/used).
  4. Writes /Exercise_04_test.txt with:
    • This is a test
  5. Ensures nested directories exist:
    • /test/testsub1/testsubsub1
  6. Writes nested file:
    • /test/testsub1/testsubsub1/Exercise_04_test.txt
  7. If either target file already exists, prints warning, erases it, then recreates it.
  8. Demonstrates permission behavior:
    • Notes FAT does not provide Unix chmod/chown.
    • Shows access behavior via FILE_READ vs FILE_WRITE modes.

Build

source /home/jlpoole/rnsenv/bin/activate
pio run -e node_a

Upload

source /home/jlpoole/rnsenv/bin/activate
pio run -e node_a -t upload --upload-port /dev/ttyACM0

Monitor

screen /dev/ttyACM0 115200