I am trying to get a project that worked fine in 4.2 to work in 4.3. I apologize, I cannot seem to find any documentation as to how to use the Sd card now. The code from before does not work, even after fixing the namespace changes. I am using the Fez Raptor board. Here is the code:
if (!sdCard.IsCardMounted) sdCard.Mount(); GT.StorageDevice storage = sdCard.StorageDevice; FileStream stream = storage.Open(fileName, FileMode.Open, FileAccess.Read); byte buffer = new byte[stream.Length]; stream.Read(buffer, 0, (int)stream.Length); stream.Close();
The card seems to always be mounted, so sdCard.Mount is not used. Before I didn’t have the if statement, it just always called mount.
When it gets to the .Open line of code, it just throws an IO exception with no other details as to what went wrong.
It has been several months since I worked with the Gadgeteer stuff, but it seems like there used to be code samples in the catalog for each module on how to use it. There isn’t one for the Sd card at least. Have these been moved? I am finding it difficult to find documentation.
I want to use the latest, but this transition to 4.3 has been extremely difficult, every module I add back into my project is taking hours to try and get working again.