Go Down

Topic: Out of Memory (Read 713 times) previous topic - next topic

LittleDice

I think I am out of sram but i'm really not sure can anyone verify?

Code is attached it was to long to post.

Senso

Maybe/probably thats the problem, learn how to use PROGMEM and move all those static strings to flash so they dont occupy any ram.
http://www.arduino.cc/en/Reference/PROGMEM

pantonvich


liudr

Too many strings. Either make them shorter or store them in PROGMEM.

LittleDice

I was under the impression that the doubles and floats were taking up the majority of the memory.

I only use the strings to parse the data out of them maybe I could just have one function to read in the variables I need and then set them back to null?

Senso

Every variable and strings are located in ram, a string is just an array of chars, so all of your serial.prints("bla bla bla") eat 1 byte of ram for each character and that is used for ever.

LittleDice

Wow I had no idea.  That solved my initial problem but I seem to have another.  Everything works correctly except the m command.  When I send that command all the info displays correctly, but it appears that the arduino resets after it completes this command.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy