Pages: [1]   Go Down
Author Topic: Arduino newbie - do sketches stay in the board during power down?  (Read 271 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,
Just starting out with Arduino and have had a scan of the online information, and the arduino for dummies book, but have not been able to determine whether the arduino board retains uploaded programs when powered down (eg Flash memory), or whether the onboard memory is volatile, so that software has to be re-uploaded each time the board is powered up.
TIA
EdT
Logged

Offline Offline
Edison Member
*
Karma: 18
Posts: 1170
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Flash is non-volatile, so it remains after power down. On power up it starts over, re-initializes and executes setup() and then loop()s.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4554
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, it keeps the program when power is removed.

(and will start running it when you apply power again).
« Last Edit: October 29, 2013, 01:39:13 pm by fungus » Logged

No, I don't answer questions sent in private messages...

UK
Offline Offline
God Member
*****
Karma: 1
Posts: 530
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just for the future... if you use the internal EEPROM memory to store data, then you will lose whatever data you stored in there, as it is volatile memory.[/s]

EDIT - You won't lose EEPROM data either...  smiley-kiss But still, it can only be used a finite number of times, and tricks in software can help with not writing unless absolutely necessary, and spreading out the wear on the cells.

You can also only use it finite amount of times before it fails.
« Last Edit: October 30, 2013, 09:49:04 am by jtw11 » Logged

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1429
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@jtw11:

Please read http://learn.adafruit.com/memories-of-an-arduino/arduino-memories

Ray
Logged

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

Thanks to all - very informative!
Ed
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4554
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can also only use it finite amount of times before it fails.

It's a LOT of times though...


Logged

No, I don't answer questions sent in private messages...

Pages: [1]   Go Up
Jump to: