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

SD Card problems

SDCard sd card

  • Please log in to reply
3 replies to this topic

#1 HaxyMaxy

HaxyMaxy

    New Member

  • Members
  • Pip
  • 7 posts

Posted 28 November 2013 - 10:14 AM

I am trying to use an adafruit logger shield but I am unable to read or write to sd card. Can someone let me know what critical piece I am missing?

 

I get this:

 

The thread '<No Name>' (0x2) has exited with code 0 (0x0).
Current Directory =
A first chance exception of type 'System.IO.IOException' occurred in Microsoft.SPOT.IO.dll
error encounteredException was thrown: System.IO.IOException
The thread '<No Name>' (0x1) has exited with code 0 (0x0).
The program '[18] Micro Framework application: Managed' has exited with code 0 (0x0).
 

 

My main function is this:

public static void Main()        {            StorageDevice.MountSD("SD", SPI.SPI_module.SPI1, Pins.GPIO_PIN_D10);            Debug.Print("Current Directory = " + Directory.GetCurrentDirectory());            try            {                for (int i = 0; i < 5; i++)                {                    Directory.CreateDirectory(Directory.GetCurrentDirectory() + "Folder" + i);                    Debug.Print("successfully created Folder" + i + "!");                }            }            catch (Exception e)            {                Debug.Print("error encountered" + e.Message);            }         }


#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 November 2013 - 10:22 AM

Hi HaxyMaxy, The SD card will be mounted at @"SD" so you'll need to work inside _that_ folder to use the SD card. The @"" folder is the root of the entire file system. Chris

#3 HaxyMaxy

HaxyMaxy

    New Member

  • Members
  • Pip
  • 7 posts

Posted 04 December 2013 - 09:26 PM

I have tried everything. keep getting notsupportedexception and ioexception.

just out of curiosity, could it be that I'm using a 16GB sdhc?



#4 HaxyMaxy

HaxyMaxy

    New Member

  • Members
  • Pip
  • 7 posts

Posted 08 December 2013 - 08:08 AM

Hi HaxyMaxy, The SD card will be mounted at @"SD" so you'll need to work inside _that_ folder to use the SD card. The @"" folder is the root of the entire file system. Chris

 

 

Is this what you are suggesting? this still throws the exception not supported exception in spot.io

            StorageDevice.MountSD("SD", SPI.SPI_module.SPI1, Pins.GPIO_PIN_D10);            string[] dirs = Directory.GetDirectories(@"SD");            foreach (string s in dirs)            {                Debug.Print(s);            }






Also tagged with one or more of these keywords: SDCard, sd, card

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.