Pages: [1]   Go Down
Author Topic: Reseting Arduino from Software  (Read 1152 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !
« Last Edit: December 14, 2009, 02:46:52 pm by Yan78 » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 616
Posts: 49444
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 616
Posts: 49444
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
void ResetArduino()
      wdt_enable(WDTO_1S);

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

I did try to disable watchdog like that .

Code:
void setup(){

wdt_reset();
wdt_disable();

...

}

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34243
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks!  smiley
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !  smiley

« Last Edit: January 10, 2010, 10:09:09 am by Yan78 » Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


« Last Edit: January 10, 2010, 10:03:07 am by jluciani » Logged


Pages: [1]   Go Up
Jump to: