Skip to content

Commit bf49cfb

Browse files
authored
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.
1 parent 9efb9e6 commit bf49cfb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/software/ide-v2/tutorials/ide-v2-serial-plotter/ide-v2-serial-plotter.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ void setup() {
5454
void loop() {
5555
potentiometer = analogRead(A1);
5656
57-
Serial.print("Variable 1:");
57+
Serial.print("Variable_1:");
5858
Serial.print(potentiometer);
5959
Serial.print(",");
60-
Serial.print("Variable 2:");
60+
Serial.print("Variable_2:");
6161
Serial.println(static_variable);
6262
}
6363
```
@@ -78,10 +78,10 @@ void setup() {
7878
void loop() {
7979
random_variable = random(0, 1000);
8080
81-
Serial.print("Variable 1:");
81+
Serial.print("Variable_1:");
8282
Serial.print(random_variable);
8383
Serial.print(",");
84-
Serial.print("Variable 2:");
84+
Serial.print("Variable_2:");
8585
Serial.println(static_variable);
8686
}
8787
```

0 commit comments

Comments
 (0)