Hello,
After experimenting a lot and reading all examples, I'm still not getting my SD card up and running.
So ... I thought, I'll go back to the bare basics ...
I have: Netduino Plus 2. Latest Firmware 4.3.1. SD Card formatted on FAT, 1.93GB
I created a new netduino plus 2 app.
Added the assemblies:
- System.io
- SecretLabs.NETMF.Hardware.NetduinoPlus
Removed :
SecretLabs.NETMF.Hardware.Netduino
Then I have this program:
using System;
using System.IO;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoPlus;
namespace SimplySD
{
public class Program
{
public static void Main()
{
// write your code here
var fileName = @"\SD\test.txt";
Debug.Print(fileName);
byte[] testBytes = new byte[] { 1, 2, 3, 4 };
File.WriteAllBytes(fileName, testBytes);
}
}
}
This ought to work right? Unfortunately it doesnt:
The result looks like:
A first chance exception of type 'System.NotSupportedException' occurred in Microsoft.SPOT.IO.dll
A first chance exception of type 'System.NotSupportedException' occurred in System.IO.dll
An unhandled exception of type 'System.NotSupportedException' occurred in System.IO.dll
Any ideas?
Paul