Hello Guys,
I am writing an Arduino programm and there i need a big switch case. If my code is too big nothing works any more. If i delete code in another file, i can add a case. But the flash memory isn't full. It has 18.288 bytes of 32.56 bytes. I do not declarate new variables in the cases. I am using an Arduino UNO.
I hope someone can help.
Are you using a lot of SRAM? More than 2048 bytes?
try to use less variables ,especilly variables array...
Thanks for the help but it was the Switch case statement. The compiler makes nested if else blocks out of the switch case so:
If....elseif elseif..... So if there are too much cases, the nesting level becomes too high.
JurijJunge:
Thanks for the help but it was the Switch case statement.
I don't believe that.
What evidence do you have to believe that?
There have been several problems just like this before.
The changing line 173 will solve it.
...R