How to stop an Arduino ?

I don't know of a way to tell the arduino to:
Cease operations, stop, etc.
I generally just unplug the USB, but that don't work as configured, because then the emergency power jumps in.

Oh yeah, unplugging the USB caused me to fry the Arduino when I unplugged the cord from the Arduino end. I saw some sparks and the Arduino was fried,

Any recommendations ?

This must be the thing you are looking for...

Cheers,
Kari

Hi,
What is the application?
What is the Arduino doing?
What model Arduino?

Can you please post your code, using code tags?
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :slight_smile:

You can put the board in sleep mode.

Please define 'stop'

From your description, you were successful in bringing your board to a complete stop.
Since you seem to have a problem, I am assuming that you also want to be able to have it start again at some point.

we can keep guessing....
...you are not worried about the program, you are worried about power ?

====================

void loop() {
if (switchA == LOW) {

// put all your stuff here

} // end switchA
} // end loop

=================

Also, what is emergency power ?
It sounds like you should have a power switch on the emergency power and one on the USB.
You would need to power off in a specific sequence.

You could connect the Reset pin to the Ground pin. That will stop the processor.

This should do the job as well:

while (true) {}

GaryP:
https://www.youtube.com/watch?v=Ur1tzMDP97g

This must be the thing you are looking for...

Cheers,
Kari

I find one of these to be more effective. https://youtube.com/watch?v=HTV0nX6vb_0

Hi,
Can you post your code please?
Do you have enough pins to connect a START and STOP button, so you stop the process your code is running without reseting or powering the controller OFF.
Also some output pins to drive a couple of LEDs?
The code would still run but loop around your process code.
What model Arduino are you using?

Thanks.. Tom.. :slight_smile: