Component: File (ESP32 SDMode) (File)
From Flowcode Help
(Redirected from Component: ID a61211f1 3718 4d37 b4a4 c6193646ccfd)
Jump to navigationJump to searchAuthor | Matrix Ltd. |
Version | 2.7 |
Category | File |
Contents
- 1 File (ESP32 SDMode) component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 AppendByteToFile
- 5.2 AppendStringToFile
- 5.3 CloseFile
- 5.4 CreateFile
- 5.5 DeleteFile
- 5.6 Initialise
- 5.7 MoveToNextFileSector
- 5.8 OpenFile
- 5.9 OpenFolder
- 5.10 ReadByteFromFile
- 5.11 ReadByteFromIndex
- 5.12 ReadFileLength
- 5.13 ReadFileSize
- 5.14 ReadStringFromFile
- 5.15 SetFileIndex
- 5.16 Uninitialise
- 5.17 WriteByteToBuffer
- 5.18 WriteFileSector
- 6 Property reference
File (ESP32 SDMode) component
File component allowing access to read and write files on an SD card using the ESP32 SD Mode IO allowing for high speed data transfer using 1-bit or 4-bit SD access.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_File_ESP32_SDMode.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_File_ESP32_SDMode.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Line Following
Line following example using the Formula AllCode, works with objects on the simulation panel and on the real hardware.
Simulation with the API component
An example showing how to use the API component to drive the robot in simulation.
Macro reference
AppendByteToFile
AppendByteToFile | |
- BYTE | Data |
- BYTE | Return |
AppendStringToFile
AppendStringToFile | |
- STRING | Data_String |
- BYTE | Return |
CloseFile
CloseFile | |
- VOID | Return |
CreateFile
CreateFile | |
- STRING | Filename |
- BYTE | Return |
DeleteFile
DeleteFile | |
- STRING | Filename |
- BYTE | Return |
Initialise
Initialise | |
Starts up the SD card interface and checks to see if a card is compatible. Returns: 0=OK, 255=No Card, 254=File System Fail | |
- BYTE | Return |
MoveToNextFileSector
MoveToNextFileSector | |
Not currently implemented on the RPI | |
- BYTE | ForceNextSector |
- BYTE | Return |
OpenFile
OpenFolder
OpenFolder | |
- STRING | Folder_Name |
- BYTE | Return |
ReadByteFromFile
ReadByteFromIndex
ReadByteFromIndex | |
Reads a byte of data from the local sector buffer. Return = Data byte read from the local sector buffer. | |
- ULONG | Address |
- BYTE | Return |
ReadFileLength
ReadFileLength | |
Not currently implemented on the RPI | |
- INT | Return |
ReadFileSize
ReadFileSize | |
Reads the entire size of the current file in bytes. | |
- ULONG | Return |
ReadStringFromFile
SetFileIndex
SetFileIndex | |
- BYTE | File_Index |
Range: 0 to 4 | |
- VOID | Return |
Uninitialise
Uninitialise | |
Terminates connection to the SD card, unmounts the SD card and disabled the SD peripheral. | |
- VOID | Return |
WriteByteToBuffer
WriteByteToBuffer | |
Not currently implemented on the RPI | |
- UINT | Address |
- BYTE | Data |
- VOID | Return |
WriteFileSector
WriteFileSector | |
Not currently implemented on the RPI | |
- BYTE | Return |