NuMaker mbed cloud v1.2 example
This example has been used on the following platforms
Follow these instructions to get credentials https://cloud.mbed.com/docs/v1.2/quick-start/connecting-your-device-to-mbed-cloud.html
Diff: main.cpp
- Revision:
- 10:3cad9e255e41
- Parent:
- 9:5c7c3e367ce6
- Child:
- 11:96f41e7c9638
--- a/main.cpp Mon Mar 19 12:52:20 2018 +0000 +++ b/main.cpp Tue Mar 20 16:20:59 2018 +0800 @@ -26,11 +26,20 @@ #include "FATFileSystem.h" #include "EthernetInterface.h" +//#define SDBLOCK_SPI_MODE + // Placeholder to hardware that trigger events (timer, button, etc) Ticker timer; // Placeholder for storage +#ifdef SDBLOCK_SPI_MODE +// SPI mode SDBlockDevice sd(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, MBED_CONF_SD_SPI_CS); +#else +// SD mode +#include "NuSDBlockDevice.h" +NuSDBlockDevice sd; +#endif FATFileSystem fs("sd");