Dear all,
i'm tring to create and write a line in a file. This is my sub code :
Imports Microsoft.SPOT
Imports Microsoft.SPOT.Hardware
Imports Microsoft.SPOT.IO
Imports SecretLabs.NETMF.Hardware
Imports SecretLabs.NETMF.Hardware.Netduino
Imports System.IO
Private Sub Create_Settings_File()
Dim SetFile As FileStream
Debug.Print("Create Sub")
SetFile = New FileStream("\SD\Settings.txt", FileMode.OpenOrCreate, FileAccess.Write, FileShare.None)
Debug.Print("File opened")
Debug.Print("Create streamwriter")
Dim sw As New StreamWriter(SetFile)
Debug.Print("Streamwriter created")
Try
Debug.Print("write into the file")
sw.WriteLine("Test")
Catch ex As Exception
Finally
Debug.Print("Close all")
sw.Close()
sw.Dispose()
SetFile.Close()
SetFile.Dispose()
End Try
Debug.Print("Exit")
End Sub
I follow the enteire process by the debug points and it seems work.
But when i take the SD card and i put it into a card reader .... it's empty !!
I have a N2+ with MF 4.2
I tried 2 MicroSD (128Mb and 2Gb no SDHC)
i tired Fat and Fat32 formatting
I thought it was easier .....
Thanks all