Pages: 1 [2]   Go Down
Author Topic: Codes working and then failing.  (Read 702 times)
0 Members and 1 Guest are viewing this topic.
Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8108
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

> 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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24462
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
//        This routine is now not used.
Nice. Thanks.
« Last Edit: November 26, 2012, 04:13:22 pm by AWOL » Logged

"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.

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6935
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
//        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.
Logged


Oz
Offline Offline
God Member
*****
Karma: 3
Posts: 659
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Norfolk UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Handle every stressful situation like a dog. If you can't eat it or hump it. Piss on it and walk away.

Oz
Offline Offline
God Member
*****
Karma: 3
Posts: 659
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24462
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

"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.

Oz
Offline Offline
God Member
*****
Karma: 3
Posts: 659
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: 1 [2]   Go Up
Jump to: