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.
This commit is contained in:
parent
a83684d0cb
commit
544d459c9b
11 changed files with 1288 additions and 6 deletions
37
exercises/04_SD_card/README.md
Normal file
37
exercises/04_SD_card/README.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
## 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
|
||||
|
||||
```bash
|
||||
source /home/jlpoole/rnsenv/bin/activate
|
||||
pio run -e node_a
|
||||
```
|
||||
|
||||
## Upload
|
||||
|
||||
```bash
|
||||
source /home/jlpoole/rnsenv/bin/activate
|
||||
pio run -e node_a -t upload --upload-port /dev/ttyACM0
|
||||
```
|
||||
|
||||
## Monitor
|
||||
|
||||
```bash
|
||||
screen /dev/ttyACM0 115200
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue