My project uses an Arduino mega paired with an ethernet shield as a data-logger. The code I've written was working just fine, however after about 1 month it stopped logging new data. I've done some tests and here is what I found.
In the beginning of the code there is
char testChar; sprintf(testChar, serverRoot);
which is working just fine. Somewhere later in the code I have a very similar
char filePath; sprintf(filePath, serverRoot);
which gives me jibberish, the Serial.print
Serial.print("filePath: "); Serial.println(filePath); Serial.print(filePath); Serial.println(" doesn't exist.);
output looks like this:
filePath : Ø ¿ doesn't eø
After this sometimes the board just freezes, other times it resets itself. I've checked ram usage using adafruit's freeRam(), this gives 2925 before the freeze.
Could my mega's ram be corrupt? How can I check this? Or could this be another problem?