From bf49cfb26d24ccb378b21df04865cd15a28f8198 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 28 Oct 2022 21:03:41 -0700 Subject: [PATCH] Fix Serial Plotter sketches for compatibility with all IDE versions The sketches provided in the Arduino IDE 2.x Serial Plotter documentation used variable labels that contained spaces. Support for spaces in labels has been intentionally dropped in order to enable fixes for critical bugs in Serial Plotter that made it incompatible with the data formats established for years by the Arduino IDE 1.x Serial Plotter. Since that Serial Plotter never supported spaces in labels, and thus the existing body of sketches did not use them in labels, it was determined an acceptable tradeoff. It may be that this enhancement will be implemented at some point in the future, but for now the example sketches in the docs must use the currently supported data format. --- .../ide-v2-serial-plotter/ide-v2-serial-plotter.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/software/ide-v2/tutorials/ide-v2-serial-plotter/ide-v2-serial-plotter.md b/content/software/ide-v2/tutorials/ide-v2-serial-plotter/ide-v2-serial-plotter.md index 5cedf4c374..1907ff8a8a 100644 --- a/content/software/ide-v2/tutorials/ide-v2-serial-plotter/ide-v2-serial-plotter.md +++ b/content/software/ide-v2/tutorials/ide-v2-serial-plotter/ide-v2-serial-plotter.md @@ -54,10 +54,10 @@ void setup() { void loop() { potentiometer = analogRead(A1); - Serial.print("Variable 1:"); + Serial.print("Variable_1:"); Serial.print(potentiometer); Serial.print(","); - Serial.print("Variable 2:"); + Serial.print("Variable_2:"); Serial.println(static_variable); } ``` @@ -78,10 +78,10 @@ void setup() { void loop() { random_variable = random(0, 1000); - Serial.print("Variable 1:"); + Serial.print("Variable_1:"); Serial.print(random_variable); Serial.print(","); - Serial.print("Variable 2:"); + Serial.print("Variable_2:"); Serial.println(static_variable); } ```