// How large is the buffer of the Serial Monitor ?
// A million characters was not possible.
//
// Forum: https://forum.arduino.cc/t/maximum-number-of-plots-in-serial-plotter-and-legends/1111159/9
// by Koepel, 6 April 2023, Public Domain
//
// Warning: Use at your own risk.
// Only JavaScript crashed for me,
// but you might not be so lucky.
//
// 500kbyte:
// The simulation slows down, depending on the sketch.
// 900kbyte:
// The screen starts to flash black and
// then crashing the JavaScript environment
// of the Firefox browser.
//
char hundred[101]=
"0123456789"
"0123456789"
"0123456789"
"0123456789"
"0123456789"
"0123456789"
"0123456789"
"0123456789"
"0123456789"
"0123456789";
unsigned long countThousands = 0;
void setup()
{
Serial.begin(2000000); // was 115200
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
Serial.print("============================================================\n");
Serial.print("thousands counter = ");
Serial.print(countThousands);
Serial.print("\n============================================================\n");
countThousands++;
for(int i=0; i<10; i++) // ten times hundred is thousand
{
Serial.print(hundred);
Serial.print("\n");
}
digitalWrite(LED_BUILTIN, HIGH);
delay(80);
digitalWrite(LED_BUILTIN, LOW);
}