SDIO - Make directory in SD Card
- Ameba x 1
- SD card or MicroSD card x 1
- SD sniffer x 1 (optional)
Open the example in “File” -> “Examples” -> “AmebaSdFatFs” -> “create_folder”
Compile and upload to Ameba, then press the reset button.
Execution result screenshot:
In the screenshot we can see that first the directory “0:/testdir” is created (the “0:/ is the disk name of the SD card when it is mounted to Ameba”).
Next we create a new file in testdir “0:/testdir/test.txt”, and read the content of the file.
Use mkdir() to create a directory, the argument requires the absolute path.
Next, create a new file with absolute path “0:/testdir/test.txt”.
SdFatFile file = fs.open(absolute_filename);