Pages: 1 [2]   Go Down
Author Topic: Reset the board automatically  (Read 1878 times)
0 Members and 1 Guest are viewing this topic.
berlin
Offline Offline
Full Member
***
Karma: 0
Posts: 154
fubbi.com
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not sure

the script listens to serial input from isadora and is basically a midi to light switch. It wont work unless I reset (press the little button).

I only need to do it once, is it ok to do it at the end of every loop?

does this apply?
http://www.arduino.cc/playground/Main/DisablingAutoResetOnSerialConnection
« Last Edit: May 16, 2009, 11:09:15 am by fubbi » Logged

U of A, Tucson, AZ
Offline Offline
Full Member
***
Karma: 0
Posts: 164
Hello World
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The trick will be figuring out how to only do the reset 'once per power cycle'.  So the 'first' time the sketch runs, it sets some flag, then resets itself.  The 'second' time it checks the flag state, and doesn't reset.  Tricky.

Also you don't hold the pin HIGH using the diode, that is done with a pull-up resistor that is probably already on the board.  What board are you using?
Logged

berlin
Offline Offline
Full Member
***
Karma: 0
Posts: 154
fubbi.com
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using a duemilanove, but I have a mega with me as well
Logged

U of A, Tucson, AZ
Offline Offline
Full Member
***
Karma: 0
Posts: 164
Hello World
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Both of those have pull-up resistors for the RESET pin on the board then.
Logged

berlin
Offline Offline
Full Member
***
Karma: 0
Posts: 154
fubbi.com
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

what does that mean, thats a good thing right?
Logged

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

Quote
The trick will be figuring out how to only do the reset 'once per power cycle'.  So the 'first' time the sketch runs, it sets some flag, then resets itself.  The 'second' time it checks the flag state, and doesn't reset.  Tricky.

If that needs to be done you may need to modify the bootloader to detect the
source of the interrupt and clear the flags.

(* jcl *)
« Last Edit: May 16, 2009, 01:26:35 pm by jluciani » Logged


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

Hi all.
Being a bit new to Arduino, I have a Arduino BT (Bluetooth) witch seems to require hit the rest buton everytime I upload to the board, or everytime I hit run on Processing. since I'm putting the Arduino in a closed box, I want to connect an exterior button so I can reset from outside. Any ideas how to do it? Can this be done from the code like previously anounced here?
Thank you for your help
Logged

berlin
Offline Offline
Full Member
***
Karma: 0
Posts: 154
fubbi.com
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually I would like to reset it once after booting it up.

For some reason the functionality doesn't kick in until after a manual reset.
Logged

New Zealand
Offline Offline
God Member
*****
Karma: 0
Posts: 999
Arduino pebbles
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmmm, I only just noticed this thread but Atmel specifically state you should not try to reset the device using its own digital out due to the fact the time the reset line is held is not long enough because when the reset starts the output pin's state will change.

It's been discussed on the forums multiple times, if Google can find it... smiley

--Phil.
Logged

berlin
Offline Offline
Full Member
***
Karma: 0
Posts: 154
fubbi.com
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there any reason a script listening for serial presence would need a reset. Is there something wrong with the script? (script posted on page 1 of this thread)

I would obviously much rather not reset.

fubbi
Logged

Pages: 1 [2]   Go Up
Jump to: