Hi. I am working on a project where I have to work with an incoming String from an user interface and write it via NFC onto a mifare transponder.
While tinkering with it I discovered that there seems to be an maximum length for Strings. But it does not seem to be a constant maximum length. It changes depending on the size of the rest of the sketch.
is that the RAM of the arduino or is it a String related problem and I should find a workaround and work e.g. with char arrays? I would like to have an idea about what limits the data before changing my whole setup.
heres the most simple test sketch in that i could simulate that behaviour. here it starts around 800 characters (which would have been fine) in the String. In my original NFC sketch the limit seemed to be reached at about 295 characters:
String message = "/*here put in a String with over 800 characters*/";
void setup()
{
Serial.begin(9600);
Serial.println(message);
}
void loop()
{
}
i would be very happy for an explanation. just to not start working in the wrong direction.