Loading...
Pages: 1 [2]   Go Down
Author Topic: Running out of memory - suggestions?  (Read 713 times)
0 Members and 1 Guest are viewing this topic.
Central MN, USA
Offline Offline
Faraday Member
**
Karma: 35
Posts: 5914
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Will test it out.
Logged


Offline Offline
Edison Member
*
Karma: 114
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Running out of memory - suggestions?

Two highly effective and absolutely sure ways to solve this problem:

1) shrink your code;
2) move to a bigger chip.
Logged

Central MN, USA
Offline Offline
Faraday Member
**
Karma: 35
Posts: 5914
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Will test it out.
Arduino 1.5.1 r2 runs normally on my windows 7, 32 bit machine. I don't have an arduino at hand to test the upload but code compiles fine.
Logged


United Kingdom
Offline Offline
Faraday Member
**
Karma: 130
Posts: 4640
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Not many fixed strings but I can delete them.  Attached is my sketch:

The warning message from the IDE very helpfully told you the first thing you needed to do, i.e. use the F() macro for all those string literals you pass to Serial.print() and Serial.println(). Looking at your code, I see that you have ignored that advice. Why are you asking for help here instead? If you don't understand what the message is suggesting, and can't understand it after doing some research, you should say so.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com

Offline Offline
Jr. Member
**
Karma: 0
Posts: 56
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If you don't understand what the message is suggesting, and can't understand it after doing some research, you should say so.
Hello...I thought I did say so:
Quote
What is PROGMEM or F("text") macro and how do I use in my sketch?
Logged

Global Moderator
Melbourne, Australia
Offline Offline
Shannon Member
*****
Karma: 218
Posts: 13896
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Reply #6 mentioned it:

Quote
Serial.println(F("This string will be stored in flash memory"));

Put F("xxx") around strings and they stay in program memory and are not copied into RAM. Did you read the linked page?
Logged


Offline Offline
Jr. Member
**
Karma: 0
Posts: 56
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks a lot Nick.  You are always very helpful.
Logged

Pages: 1 [2]   Go Up
Print
 
Jump to: