Pages: [1]   Go Down
Author Topic: Running Arduino after unpowering  (Read 556 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All,

it seems strange but I can't simply seem to find an answer to the most basic question I think could be asked for the arduino;

I want to run my program on the arduino and after disconnecting the power (and USB) it should just restart the program it had before.
Is this possible or do I need to upload the program via USB all the time again?

thanks,
Bastiaan
Logged

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

Quote
it should just restart the program it had before.
Yes that is what happens when you plug it in again or apply some external power through the power jack.

Quote
do I need to upload the program via USB all the time again?
No need to upload again, the sketch is in until you over write it with something else.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Mike,

thanks for that, that is a relief!
Probably something else went wrong when I powered it up again, and led me to some faulty conclusions.

thanks for the answer!
Bastiaan
Logged

Offline Offline
Faraday Member
**
Karma: 61
Posts: 2895
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When I want to change some part of the circuit or want to stop the sketch
from running,  I unplug the USB cable from
the Arduino.  I then make the change  and plug the USB cable back in.

Every time I do this,  the computer won't communicate with the arduino any more.

If I unplug the USB cable again,    and then plug it back in,   it always works the
second time.

Is there any reason for this ?  It is creating double the wear and tear on the USB
socket,  and sooner or later something will get broken while I am pulling it in
and out.
Logged

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

Quote
When I want to change some part of the circuit or want to stop the sketch
from running,  I unplug the USB cable from the Arduino.

This might happen if something on your computer has the serial port open, like the monitor. Always close that down before pulling the plug.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rules
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've never had to unplug anything after changing the code, except for today with a new install of Version 1 when the "avrdude" programmer returned an out-of-sync message. All I do is upload the new code, then hit the reset button to start things running again.

If that doesn't fix it, and you must unplug, then add another short USB extension cable. Leave that one plugged into your Arduino, and disconnect from the longer cord. I use this method frequently on my PC's to avoid damaging their USB ports.
Logged

Pages: [1]   Go Up
Jump to: