Pages: [1]   Go Down
Author Topic: EEPROM  (Read 1059 times)
0 Members and 1 Guest are viewing this topic.
Connecticut
Offline Offline
Edison Member
*
Karma: 16
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In theory, could I load a VERY small program into the EEPROM, and then, at a certain point in my code, load the program?

Ex.
I run my very complex program until a button is pressed. The arduino then loads this program:

Code:
void setup() {}
void loop() {}

(It's my null program, it does nothing and takes up 450bytes of space.)
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12286
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Why would you want to do that?
Logged

Connecticut
Offline Offline
Edison Member
*
Karma: 16
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
[glow]In theory,[/glow] could I load a VERY small program into the EEPROM, and then, at a certain point in my code, load the program?

I never said I did.
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It would be completely pointless... In theory you could make a cannon which fired toasters - not a lot of point to it.

You are better off just making them different looping functions and having the button as an interrupt to run some code to switch between them  smiley-wink
Logged

0
Offline Offline
God Member
*****
Karma: 39
Posts: 986
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Programs in EEPROM?  No problem: http://bitlash.net

smiley-wink

-br
http://bitlash.net
http://entropymouse.com
Logged

Connecticut
Offline Offline
Edison Member
*
Karma: 16
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Do you just pull these ideas at random out of thin air?

Yes, I did. I pressurized the air in my house and put into a sealed flask with this:
http://www.sparkfun.com/products/10221
As the air evaporated, the levels were fed from the sensor to my arduino, which output the data as ASCII.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46204
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Yes, I did.
Good thing you told us. I was beginning the think you'd pulled them from somewhere else.  smiley-wink
Logged

Pages: [1]   Go Up
Jump to: