| .. | ||
| src | ||
| platformio.ini | ||
| README.md | ||
Exercise 04: SD Card
This exercise loops forever. Each cycle:
- Prints
Sleeping 10 secondsand waits 10 seconds. - Detects and mounts the SD card.
- Prints card and filesystem info (type/size/used).
- Writes
/Exercise_04_test.txtwith:This is a test
- Ensures nested directories exist:
/test/testsub1/testsubsub1
- Writes nested file:
/test/testsub1/testsubsub1/Exercise_04_test.txt
- If either target file already exists, prints warning, erases it, then recreates it.
- Demonstrates permission behavior:
- Notes FAT does not provide Unix
chmod/chown. - Shows access behavior via
FILE_READvsFILE_WRITEmodes.
- Notes FAT does not provide Unix
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