I am using MAX32360FTHR controller for an IoT application. In my application I am supposed to measure the sensor values and keep storing, and then after a predefined interval send to cloud using LTE module. I want to store the measured values (accelerometer sensor) either in RAM or SD card.
What is the best approach to handle this?
I have tried using SDBlockDevice API but there was an initialization error, then I moved to BlockDevice API and used this code to initialize SD Storage Block which seems to work fine.
BlockDevice *bd = new SDBlockDevice(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, MBED_CONF_SD_SPI_CS);
What is the difference between using above approach and using SDBlockDevice API directly?
(I used code from following page: BlockDevice - API references and tutorials | Mbed OS 6 Documentation)
Thanks in anticipation.