Netduino plus, SD Card can not get a basic example of work

Hi, I want to try my SD card on netduino plus. I downloaded the SDK from this site yesterday.

I could not find the documentation, so I figured out the following code. However, it gives "CLR_E_VOLUME_NOT_FOUND". What am I doing wrong? I read something online about installation and some DLL (SecretLabs.NETMF.IO.dll), but I can not find this DLL.

Can someone help me get started?

public class Program
{
    public static void Main()
    {
        var dir = Directory.GetCurrentDirectory();
        var fileName = Path.Combine(dir, "test.txt");
        Debug.Print(fileName);
        byte[] testBytes = new byte[] { 1,2,3,4 };
        File.WriteAllBytes(fileName, testBytes);
    }

}

Output:

\ test.txt

The exception is System.IO.IOException - CLR_E_VOLUME_NOT_FOUND (1) Message: System.IO.Path :: NormalizePath [IP: 0070] System.IO.Path :: GetFullPath [IP: 001a] System.IO.FileStream ::. Ctor [IP: 0009] System.IO.File :: WriteAllBytes [IP: 0012] NetduinoPlusApplication1.Program :: Main [IP: 0025]

System.IO.dll "System.IO.IOException" "System.IO.IOException" System.IO.dll

+3
2

Netduino, . .

\SD\. Mounting/dll Netduino SD-.

:

  • MicroSD ​​ \SD\, \
  • MicroSD 2 , , .
  • SecretLabs.NETMF.IO - Netduino. Netduino Plus MicroSD.
+6

\Samples\SDCardTest http://netduinohelpers.codeplex.com/ , Netduino (, SD- Netduino Mini , Netduino Netduino Plus). 4.1.1 Beta 1, microSD 8 .

+1

Source: https://habr.com/ru/post/1780019/


All Articles