I try to mount a SD Card on my Adafruit GPS shield, but as soon as the "StorageDevice.MountSD" method is called it throws a "System.NotSupportedException"
Firmware: 4.2.0.0 (RC5)
SD Card: SanDisk 1GB formatted with FAT32/4096 blocksize (No-SDHC!)
The shield description says "The SD card must be connected to the Arduino digital pins 13, 12, 11, and 10 for it to work and so those pins are 'taken'" (source)
So I would assume the information are correct.
For RC6 I would recommend to throw a more meaningful exception, what really went wrong...currently I'm stuck how to access my SD card. All examples use the API available only with FW:4.2.0.0 (RC5).
I would also stay with the official 4.1 as its more stable on deploying and debugging but until now found no example how to use my SD card on the shield.
Thanks
public static void Main() { try { //Just for debugging Thread.Sleep(10000); StorageDevice.MountSD("SD", SPI.SPI_module.SPI1, Pins.GPIO_PIN_D10); using (var filestream = new FileStream(@"SD\test.txt", FileMode.Create)) { StreamWriter streamWriter = new StreamWriter(filestream); streamWriter.WriteLine("Testcontent written to my file."); streamWriter.Close(); } using (var filestream = new FileStream(@"SD\test.txt", FileMode.Open)) { StreamReader reader = new StreamReader(filestream); Debug.Print(reader.ReadToEnd()); reader.Close(); } StorageDevice.Unmount("SD"); } catch (Exception ex) { Debug.Print(ex.ToString()); } }