On the usb serial for Teensy 3.1, does it still utilize the print(F(" ")) notation to free up the memory after the print action completes? I had a fairly lengthy code that printed quite a few Strings where I utilized this type of code. After about 40 minutes the code would hang up.
My alternate approach, since most of the Strings were repeats was to create char arrays for them as global variables and just use Serial.print(char array). It seems to be working just fine now.
Old approach:
Serial.println(F("Data Update Requested......"));
New approach:
char dUpdate[] = "Data Update Requested......";
Serial.println(dUpdate);
I want to make sure I'm using the proper approach as I have read that there may be differences in the USB serial and hardware serial and how Serial.print() might work on each.
My alternate approach, since most of the Strings were repeats was to create char arrays for them as global variables and just use Serial.print(char array). It seems to be working just fine now.
Old approach:
Serial.println(F("Data Update Requested......"));
New approach:
char dUpdate[] = "Data Update Requested......";
Serial.println(dUpdate);
I want to make sure I'm using the proper approach as I have read that there may be differences in the USB serial and hardware serial and how Serial.print() might work on each.
Last edited: