Code Reset

Hi guys I have a Panda II and for some reason I am having trouble finding a function to call to reset the board instead of having to hit the RST Button.

For example, once my code finished I would like the last line to act as a reset button.

Loads of information here and I still can’t find it!

Thanks

@ Electo - Hi Electo,

Do you mean you want your code to keep repeating?

Hi Electo,

Does this help?

PowerState.RebootDevice (Microsoft.SPOT.Hardware)

Chris

@ Justin - Yes pretty much.

And Chris, that does help but it doesn’t seem to like the “void” I get an error of Expected Class, delegate… etc

Sorry to be very braud, I am very new to this!

Thanks

@ Electo

Show your code please.

public static void Main()
        {
            OutputPort LED;
            LED = new OutputPort((Cpu.Pin)EMX.Pin.IO47, true);
 
            while (true)
            {
                LED.Write(!LED.Read());
                Thread.Sleep(200);
            }
        }

Any code inside the while (true) loop will keep looping and in this case turning the led on and off

@ Electo - See how that method is used in the reply #15 in this thread:

http://www.tinyclr.com/forum/topic?id=2631&page=2#msg26007

@ Architect - That

Microsoft.SPOT.Hardware.PowerState.RebootDevice(false);

worked perfect!

Thanks a lot everyone for the input! Very helpful forum! Glad I chose Gageteer!

You are welcome!

@ Electo - Just a note, that may not be the best method to use depending on what you are trying to achieve, as Architect mentioned show some code on what you are trying to do and there might be a more elegant approach.

@ Justin - This works for now, since I am trying to jump between File Systems. Maybe later I will dress it up!