Libraries and Examples for Macchina M2 HSMCI (High Speed MultiMedia Card Interface). Provides faster read/write to SD cards while freeing up SPI interface.
- Download the files
- Move the folder
Arduino_Due_SD_HSMCIto your Arduino Libraries
- The
SDobject will be created on#include <Arduino_Due_SD_HSMCI.h> - Use
SD.MakeDirectoryto create a directory
- Create a new FileStore with
FileStore * f = new FileStore() - Initiate the File pointer with
f->Init() - Open the File Structure with
f->Open([DIRECTORY], [FILENAME], [FILE_WRITE | FILE_READ]) - Write with
f->Write([BUFFER], [LENGTH]); - Close
f->Close()
There are 6 example sketches included in Arduino_Due_HSMCI-master Library. List and description of examples in order of complexity:
DirManipulationcreates new directory, rename directory and delete directory from SD cardFileManipulationcreates new file, open/close file, rename file and delete fileFileListcreates files and writes raw data to them, checks writing times and creates a list of files on SD cardDatalogger_difcreates new file, reads GPIO and log data to SD cardDumpdata_SerialtoSDcreates new file than reads from SerialUSBand writes to the fileDumpdata_SDtoSerialcreates new file with raw data than reads from file and print to SerialUSB
HSMCI library has the Debug option which can be enabled (DEFAULT) or disabled. To change that, please open Arduino_Due_SD_HSMCI.h and change constant SD_DEBUG to “true” (enabled) or false (disabled).