Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Some help with my SD card issue

SD Plus 2

  • Please log in to reply
No replies to this topic

#1 Pablo020

Pablo020

    New Member

  • Members
  • Pip
  • 5 posts

Posted 05 December 2014 - 01:51 AM

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

 

 

 

 

 

 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.