Use FatFs to read and write file

Status
Not open for further replies.

daphwl

Newbie
Joined
Jun 30, 2021
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
84
AMEBA RTL8722DM
Ameba RTL8722DM is a low-power dual-band WLAN and BLE(Bluetooth Low Energy) SoC by Realtek. The RTL8722DM also include memory for Wi-Fi protocol functions and application making it simple for anyone to develop various kind of IoT applications. At the same time it has a wide range of peripheral interfaces. With all these interfaces, it can connect to most of the electronics components like LEDs, temperature and humidity sensors, and so on.

FATfs
FatFs is a generic FAT/exFAT filesystem module for small embedded systems.

Supplies
Ameba D [RTL8722DM_mini] x1

MicroSD card x1


Programming

Firstly, insert a MicroSD card into the onboard SD card Reader of RTL8722DM_mini board.

Next, to open the example code, go to "File" -> "Examples" -> "AmebaFatfsSDIO"-> "file_read_write".


Final Results


Upload the code and once the upload is finish, press the reset button on the Ameba.



In the example code, we created the text file "test.txt" with content "hello world". Read the file and print content to a serial monitor.

Next, insert the SD card into a card reader and check whether the operations have succeeded.


If you need additional technical documents or the source code for this project. Please visit the official websites and join the Facebook group and forum.

Ameba Official Website: https://www.amebaiot.com/en/

Ameba Facebook Group: https://www.facebook.com/groups/amebaioten

Ameba Forum: https://forum.amebaiot.com/
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…