Using an SD Card with Gateway


#1

I understand that SPI and I2C are not available on the Bluz Gateway.

So how can one add local storage (say on an SD card)?

Thanks in advance.


#2

There is EEPROM storage available on the Particle device in the gateway. Do you need more than that?

You can use any shield with the gateway shield for the Particle device, as long as the pin mappings work. Not sure if there is some option out there that can provide more storage for the Photo/Electron, but there could be


#3

Hi @eric,

As a followup, I need to use an SD card with the Gateway. I understood from you in a previous message that the Gateway uses A2-A6 on the Photon. Since these are also default SPI SD card pins (SPI_CONFIGURATION == 0), can I use any other one of the configurations below (for example SPI_CONFIGURATION == 1)?

// Setup SPI configuration.
#if SPI_CONFIGURATION == 0
// Primary SPI with DMA
// SCK => A3, MISO => A4, MOSI => A5, SS => A2 (default)
SdFat sd;
const uint8_t chipSelect = SS;
#elif SPI_CONFIGURATION == 1
// Secondary SPI with DMA
// SCK => D4, MISO => D3, MOSI => D2, SS => D1
SdFat sd(1);
const uint8_t chipSelect = D1;
#elif SPI_CONFIGURATION == 2
// Primary SPI with Arduino SPI library style byte I/O.
// SCK => A3, MISO => A4, MOSI => A5, SS => A2 (default)
SdFatLibSpi sd;
const uint8_t chipSelect = SS;
#elif SPI_CONFIGURATION == 3
// Software SPI.  Use any digital pins.
// MISO => D5, MOSI => D6, SCK => D7, SS => D0
SdFatSoftSpi<D5, D6, D7> sd;
const uint8_t chipSelect = D0;
#endif  // SPI_CONFIGURATION

#4

Yes, as long as the pins don’t interfere with the main gateway pins, you should be fine