I am unable to communicate with an SD card attached to a netduino 1 (formatted 4.2.0.1) via adafruit pre assembled SD card
logger shield.
using System;using System.IO;using Microsoft.SPOT.IO;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.IO;using SecretLabs.NETMF.Hardware.Netduino;namespace _2010testapp{ public class Program { public static void Main() { StorageDevice.MountSD("SD1", SPI_Devices.SPI1, Pins.GPIO_PIN_D10); string[] directories = System.IO.Directory.GetDirectories(@""); Debug.Print("directory count: " + directories.Length.ToString()); for (int i = 0; i < directories.Length; i++) { Debug.Print("directory: " + directories[i]); } string[] files = System.IO.Directory.GetFiles("SD1"); Debug.Print("file count: " + files.Length.ToString()); for (int i = 0; i < files.Length; i++) { Debug.Print("file: " + files[i]); } while (true) { } } }}
when it gets to the line "string[] files = System.IO.Directory.GetFiles("SD1");"
I get an exception "An unhandled exception of type 'System.IO.IOException' occurred in System.IO.dll"
I have tried with a 4 gb micro sd card in an adapter and a 16gb sd card.
both have been tried in every format availible in the built in windows sd card formatter.
Thank you in advance for any insight to my problem,
Maxwell