Skip to main content
2 of 3
added 34 characters in body

Nano V3 values "overwritten" randomly

When I assign a global var to a certain value inside an if-block it has been changed to another value in the next statement. Somehow the address of the var is overwritten by some other process. It also does not stop at 1 value, this happens to the next vars that are assigned another value too. The vars are not defined in a row but should be close. I already installed a newer version of Arduino IDE, no change. Example: menuActive=1; Serial.print(menuActive); gives results in the range 40 to 57 as far as I have seen till now. Further actions assign always the SAME value to next vars I assign after this. Anyone some idea what could cause this? Am I low on memory for local vars? This is compile message: Sketch uses 21790 bytes (70%) of program storage space. Maximum is 30720 bytes. Global variables use 1454 bytes (70%) of dynamic memory, leaving 594 bytes for local variables. Maximum is 2048 bytes.