Open rithviknishad opened 4 years ago
Scnrshot after multiple reset
What I did to arrive at this error was: (for pausing the SerialPlotter when a SONAR sensor has been activated and it's Echo and Trig Pins are monitored by another arduino)
I don't know if this is of any help but the java code for plotter ca be modified such that a clear command can be introduced. In the ~/Arduino/app/src/processing/app/ directory modify the SerialPlotter.java file and add
if ( line.equals("<CLEAR>")) { graphs.clear(); // Clear the graphs xCount = 0; // Reset the count of data points }
in the public void message
function right after the line trim occurs. In this way you should be able to manually send a clear message and make sure that the graph is cleared even after the resets. This should remove any graph points in the array, and hopefully also remove
the static point you get in the beginning. I have not tested this idea on the recent distrib of the IDE,as i just took it from an old project I developed with my friends back in 2017. Hope it helps.
This is not a bug, but by design. The Arduino GUI, which the Serial Plotter is part of, have no way to know if you reset your board, e.g. by pressing a reset button.
@nikolradulov has made a remote command patch in #9953 but this has some overlap with #7461. It seems someone need to decide upon a roadmap or similar for Serial Plotter.
When plotting using Serial.println and then pausing the Serial.println (just like a one time trigger), and then resetting the arduino to perform it again, the old serial plotted point is not erased and remains static in the plot window.