Hi. I have a Very simple program that creates a file on an SD card at boot up. If the File exists, it lights the LED and deletes the file (so the next boot up the LED is off).
This works perfectly while plugged into my computer via USB -- every other reboot the LED is on. When the ND is being powered by an external power supply it does not work -- EVERY reboot the LED is on.
I have an ND+1 with 4.2 and a 2GB SD Card formatted to FAT32.
Any ideas?
Imports Microsoft.SPOTImports Microsoft.SPOT.HardwareImports SecretLabs.NETMF.HardwareImports SecretLabs.NETMF.Hardware.NetduinoPlusModule Module1 Public _onBoardLED As OutputPort Sub Main() _onBoardLED = New OutputPort(Pins.ONBOARD_LED, False) If System.IO.File.Exists("SDRebootMe.txt") Then Do Until System.IO.File.Exists("SDRebootMe.txt") = False System.IO.File.Delete("SDRebootMe.txt") Loop _onBoardLED.Write(True) Else Do Until System.IO.File.Exists("SDRebootMe.txt") = True Dim file As New System.IO.FileStream("SDRebootMe.txt", System.IO.FileMode.Create) Dim SR As New System.IO.StreamWriter(file) SR.WriteLine("FooBar") SR.Flush() SR.Close() file.Close() Loop _onBoardLED.Write(False) End If End SubEnd Module
Thank you!
Terry