Go Down

Topic: Reseting Arduino from Software (Read 1 time) previous topic - next topic

Yan78

Dec 14, 2009, 08:46 pm Last Edit: Dec 14, 2009, 08:46 pm by Yan78 Reason: 1
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 !

PaulS

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

Yan78

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 ??

Yan78

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 !

PaulS

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

Yan78

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

Code: [Select]

void ResetArduino()
     wdt_enable(WDTO_1S);


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

I did try to disable watchdog like that .

Code: [Select]

void setup(){

wdt_reset();
wdt_disable();

...

}


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

Yan78

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 !

Grumpy_Mike

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.

Yan78


Yan78

#9
Jan 10, 2010, 03:04 pm Last Edit: Jan 10, 2010, 04:09 pm by Yan78 Reason: 1
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 !  :)


jluciani

#10
Jan 10, 2010, 04:01 pm Last Edit: Jan 10, 2010, 04:03 pm by jluciani Reason: 1
The software reset using the watchdog works but requires a bootloader modification.
See my application hint at http://tinyurl.com/yzfe74b

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


www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks

Go Up