Go Down

Topic: Codes working and then failing. (Read 952 times) previous topic - next topic

johnwasser

> Has anyone actually tried to compile the codes?
I think I compiled one of the four versions you posted.

> How much memory do these things have?
- 32K Bytes of In-System Self-Programmable Flash program memory
- 1K Bytes EEPROM
- 2K Bytes Internal SRAM

> Will I be told if the program/sketch exceeds the memory limits of the board?
FLASH, yes.  SRAM or EEPROM, no.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

AWOL

#16
Nov 26, 2012, 10:10 pm Last Edit: Nov 26, 2012, 10:13 pm by AWOL Reason: 1
Example_menu seems to have a lot of strings not in PROGMEM.

Code: [Select]
//        This routine is now not used.
Nice. Thanks.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

liudr


Example_menu seems to have a lot of strings not in PROGMEM.

Code: [Select]
//        This routine is now not used.
Nice. Thanks.


I think some of the code might have come from my original alarm clock code for phi-2 shield and the OP is no longer in need of those.

lost_and_confused

Guys,

That code is not used.  Granted.

It was blocked out so if there were problems I could quickly get back to it.

As it is remarked out, it won't be uploaded to the Arduino - right?

So really I could have 2 meg of comments and it wouldn't really change how much the ACTUAL sketch uses/needs.

Now I have to go through and remove all the old stuff from the original alarm clock code which I don't use/need.

Like the big font and remove all references to it.

I hope that gives me more memory.  Well, a LOT MORE memory.
What I am wanting to add may need a fairly good bit of memory.

When I get time I will try and and see what happens.

Thanks for now.

Riva

You don't have much flash remaining to store strings so unless you can trim your code and structures it might be worth considering some external flash for storing strings in.
http://forum.arduino.cc/index.php?action=unread;boards=5,67,10,11,66,12,15,17,21,22,23,24,25,29;ALL

lost_and_confused

UPDATE:

Yes, thanks to all.

It is to do with size.  (but isn't it always?)

I got one of the later codes and cut out all the Serial.print() lines and stuff like that.

It works!

So it is now known that the code is filling up the available memory.

Drats - kinda.

The code I trimmed was the 10afya_W version.
Though there is/was a V11 that was a whole new ball game and I think it is now a lost cause as the additions are many.

So:  With my UNO - or equivilant - I am "out of memory".

Riva suggested using flash for storage.  But sorry, with my knowledge:  Storage of what?
(I don't know if you have seen "my" code.)
You say variables.  I can understand the idea but the implimentation etc...

I will leave it at that for now.   But thougth I would report what I have since learned.

AWOL

Quote
So it is now known that the code is filling up the available memory.

But surely the compiler would have told you that?
Don't you mean the VARIABLES are filling up memory?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

lost_and_confused

AWOL,

Ok, sorry.  Terms.....

What ever.

I never saw an error from the IDE.  So the thought of "LOW MEMORY" never really entered my mind until the other night when I simply added two lines and it died.

I happened to notice the numbers at the bottom when it complied and noticed they were "close".

27,746 and 32,xxx...

Well, the learning curve is not quite as steep, but now I need to work out how to get it better "optimised" so I can add these other features - if at all possible.

Go Up