I am making GSM control unit. Arduino strucks on any command in function(check photo):
void epwrite(){
if(kelintas==1){
for(i=0;i<9;i++){
EEPROM.write(i, atpaz.substring(i, i+1).toInt());
}}
if(kelintas==2){
for(i=10;i<19;i++){
EEPROM.write(i, atpaz1.substring(i-10, i-9).toInt());
}}
if(kelintas==3){
for(i=20;i<29;i++){
EEPROM.write(i, atpaz2.substring(i-20, i-19).toInt());
}}
delay(700);
Serial.println("anything");
}
I tried to add SRAM checking function Arduino Playground - AvailableMemory and it shows about 900bytes of memory left. When I put more commands it strucks earlier. That could be fault about this error? When I call this command from other place it works good. Can I change stack and heap on arduino, as on IAR? Whole code is about 490lines, pretty long.. Maybe some other ideas?
When code was not so long, it worked good. Added more functions - it should write something one time, but it has been writting twice; much more functions - it strucks.
When code was not so long, it worked good. Added more functions - it should write something one time, but it has been writting twice; much more functions - it strucks.
That's generally what happens when you run out of memory.