Reseting Arduino from Software

Hi everyone ! Can you help me please with some ideas ! Is it any way I can reset Arduino using software and not hardware ( by pressing a reset button ) ?

I need something like a procedure to used in a code to reset Arduino .

Thank's in advance and I look forward for your reply's !

Just out of curiosity, why do you need to do this?

I have a code that upload some data to a pachube feed .

http://www.pachube.com/feeds/3924

When it is powered on the code is not working . I believe the problem is the ethernet shield . After a manual reset everything is ok and working !

So I want to use software reset to do everything automaticaly . Is it any way ??

I believe that the Shield is the problem because after power on , I'm trying a ping test . I have no response ! After manual restart , I have replies from ethernet shield !

Lots of problems reported in the forum with the ethernet shield. Some solutions, too. A search should yield some answers.

I'm back ! I did try to use watchdog timer from controler to reset it .
Something like a new function :

void ResetArduino()
      wdt_enable(WDTO_1S);

The code is good but Arduino doesn't start again until a power off :frowning: . Not good for me because he is just restarting and restarting .

I did try to disable watchdog like that .

void setup(){

wdt_reset();
wdt_disable();

...

}

But still no luck ! Any ideea ? What is it wrong ?

I believe ( after finding some posts with google ) that WDT is not the best option . So I will try 555 timer . I'll keep you informed !

If it is the shield's reset you need to activate simply re wire it to an arduino pin and then pulse the pin. Depending on your type of shield this might already be wired up in this way. Check the schematics.

Thanks! :slight_smile:

I'm back with news ! I used a 555 monostable and now I can reset arduino using one digital output from software . It works fine ! :slight_smile:

The software reset using the watchdog works but requires a bootloader modification.
See my application hint at Loading...

A capacitor between an I/O pin and the reset line may work but triggering a monostable
is a much better solution. With the capacitor I would add a protection diode
to the reset pin.

(* jcl *)


www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks
blog: http://luciani.org