-
-
Notifications
You must be signed in to change notification settings - Fork 481
Fix Serial Plotter sketches for compatibility with all IDE versions #621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
What is the issue on printing a string with spaces?
I don't get the sketch change 🤔
@marqdevx this is what the previous sketch looks like in the plotter:
Note that the variable labels are "1" and "2" instead of "Variable 1" and "Variable 2".
Here is how sketch looks in the plotter after my proposed change:
Note that the variable labels are "Variable_1" and "Variable_2", just as they are in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I didn't know about this!! 🤯
Thanks for the clarification
It would be nice to also update the screenshots of the Serial Monitor @jacobhylen
To align the sketch with the output
It would be nice to also update the screenshots
Thanks for raising that point @marqdevx. I agree. I apologize for not taking care of that as part of the PR. Although screenshots are easy enough for me, I'd be happy to submit a separate PR providing those if you like.
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 trade-off.
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.
What This PR Changes
Use the supported variable label format in the Serial Plotter demonstration sketches.
Contribution Guidelines