Sketch uses 13,308 bytes (41%) of program storage space. Maximum is 32,256 bytes.
Global variables use 2,082 bytes (101%) of dynamic memory, leaving -34 bytes for local variables. Maximum is 2,048 bytes.
processing.app.debug.RunnerException: Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.
at processing.app.Sketch.size(Sketch.java:1680)
at processing.app.Sketch.build(Sketch.java:1590)
at processing.app.Sketch.build(Sketch.java:1509)
at processing.app.Editor$DefaultRunHandler.run(Editor.java:1915)
at java.lang.Thread.run(Unknown Source)
Could any one explain to me what these bytes and percentages values mean ?
the only thing that I Know ,is that Arduino Uno had 32kb flash memory , 2 Kb is used by the bootloader , the remainder is 30Kb , Why It tells me that "Not enough memory" and my Sketch is only 13,308 bytes ? What is the sloultion for a problem such that ?
Short answer.
Don’t use so many global variables. One possible place to save space would be when you declare pin numbers for various I/O, instead of int RIGHTMOTORENABLE = 5; you could replace that with #define RIGHTMOTORENABLE 5
Both decorations perform a similar function, but, the #define will replace RIGHTMOTORENABLE with 5 throughout the code listing before the code is compiled. You probably have some global variables that could be made local.
There are basically two
There are basically two areas of memory in C programs: the area where the program’s code was loaded and reside, and the area where the “heap” is, where all the dynamic variables are kept. Normally you wouldn’t care, but on platforms that have such small amounts of memory as AVR it becomes important. What can you do? Put as much as you can into constants that get stored together with your program and never need to be modified, and not on the heap – that is, in normal variables.