Go Down

Topic: Reset the board automatically (Read 2 times) previous topic - next topic

fubbi

#15
May 16, 2009, 06:03 pm Last Edit: May 16, 2009, 06:09 pm by fubbi Reason: 1
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

estranged

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?

fubbi

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

estranged

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

fubbi

what does that mean, thats a good thing right?

jluciani

#20
May 16, 2009, 08:24 pm Last Edit: May 16, 2009, 08:26 pm by jluciani Reason: 1
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 *)
www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks

bedu

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

fubbi

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.

follower

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... :)

--Phil.

fubbi

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

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview