B4X FEED SD cards

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: SD cards است. این موضوع تا کنون 18 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع SD cards
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
18
پسندها
0
آخرین ارسال توسط PracticalSoft
Jun 6, 2020
11,559
4,422
The rSD library allows reading and writing to SD cards. The Ethernet shield as well as other shields include a SD slot.

The steps required to work with files:
1. Initialize a SD object. You need to pass the CS pin used. See this link for more information:

2. Open a file with a call to SD.OpenRead or SD.OpenReadWrite.

3. Read or write to the file stream with SD.Stream property.

4. Close the file with SD.

Note that opening a different file will close the previous one.

There is a bug in Arduino tool chain that can lead to this error message during compilation:
GetFileAttributesEx E:\arduino\libraries\SD\src\File.cpp E:\arduino\libraries\SD\src/SD.h: The filename, directory name, or volume label syntax is incorrect.

The workaround for this error is to press on Ctrl + P (clean project) before compilation.

Listing files


This is done with a For Each loop and a call to ListFiles:
B4X:

For Each f As File In sd.ListFiles("/")...



 

عقب
بالا