Modifications to the Arduino IDE Serial Plotter

654 views
Skip to first unread message

Chris Mower

unread,
Jan 17, 2017, 9:10:20 AM1/17/17
to Developers
I needed the Serial Plotter to have a much smaller range, say from +8V to +10V but I couldn't see a way to do this with the current plotter even after asking on the Forum ( see article http://forum.arduino.cc/index.php?topic=448650.0 ) So I decided to modify the plotter code to provide the functionality I needed.

I have added a drop-down combo box to the serial plotter chart which enables you to set the range of the graph from the plotted value. I have also added the ability to clear the graph data by sending a command as documented in the forum post above.

So, would this be something that would be of interest as an addition to the build? If so I am happy to do further work on this code to enforce robustness, and perhaps add some other features which I am planning for my own use.

Regards
Chris

Gabriel Staples

unread,
Jan 17, 2017, 10:27:02 AM1/17/17
to devel...@arduino.cc
This sounds like a great addition to me. The Serial Plotter is an area where many useful improvements could be made.


Sincerely,

Gabriel Staples
Electric RC Aircraft Guy, LLC
www.ElectricRCAircraftGuy.com

(sent from my Android)

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

André Kjellstrup

unread,
Jan 17, 2017, 11:06:41 AM1/17/17
to devel...@arduino.cc
Nice ! the one time I actually needed the serial plotter, it proved useless just because of that.

Tom Igoe

unread,
Jan 17, 2017, 11:10:49 AM1/17/17
to devel...@arduino.cc
Nice idea, thank you. I thought about throwing in the ability to read multiple CSV values, too.

t.

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Chris Mower

unread,
Jan 17, 2017, 11:16:13 AM1/17/17
to devel...@arduino.cc
Tom,

it can do that already if you mean this sort of thing - 
int x = something;
double y = something else;
Serial.print( x );Serial.print(",");Serial.println( y );

They need to be on the same line and separated by comma or tab.

Chris

To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.



--
Kind Regards,

Chris

Tom Igoe

unread,
Jan 17, 2017, 11:26:55 AM1/17/17
to devel...@arduino.cc
Wow, and I just never tried it?  Okay, I feel foolish. But in a good way, thank you!

Tom

To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Chris Mower

unread,
Jan 17, 2017, 12:02:15 PM1/17/17
to Developers
Tom,

Not at all. The documentation is rather thin on the ground and I only found out the same way as you :-)

Chris

On Tuesday, January 17, 2017 at 4:26:55 PM UTC, t.igoe wrote:
Wow, and I just never tried it?  Okay, I feel foolish. But in a good way, thank you!

Tom
On Jan 17, 2017, at 11:15 AM, Chris Mower <chris...@gmail.com> wrote:

Tom,

it can do that already if you mean this sort of thing - 
int x = something;
double y = something else;
Serial.print( x );Serial.print(",");Serial.println( y );

They need to be on the same line and separated by comma or tab.

Chris
On 17 January 2017 at 16:10, Tom Igoe <t.i...@arduino.cc> wrote:
Nice idea, thank you. I thought about throwing in the ability to read multiple CSV values, too.

t.
On Jan 17, 2017, at 9:01 AM, Chris Mower <chris...@gmail.com> wrote:

I needed the Serial Plotter to have a much smaller range, say from +8V to +10V but I couldn't see a way to do this with the current plotter even after asking on the Forum ( see article http://forum.arduino.cc/index.php?topic=448650.0 ) So I decided to modify the plotter code to provide the functionality I needed.

I have added a drop-down combo box to the serial plotter chart which enables you to set the range of the graph from the plotted value. I have also added the ability to clear the graph data by sending a command as documented in the forum post above.

So, would this be something that would be of interest as an addition to the build? If so I am happy to do further work on this code to enforce robustness, and perhaps add some other features which I am planning for my own use.

Regards
Chris


--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.


--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.



--
Kind Regards,

Chris

Chris Mower

unread,
Jan 17, 2017, 12:11:47 PM1/17/17
to Developers
I am attaching the java file for the modified SerialPlotter. I would be obliged if others could test it and check that it is not causing issues.

The attached file goes in - ~/Arduino/app/src/processing/app/

then rebuild in the normal way. You should get a plotter that looks like the attached picture. You can then set the span of the Y-Axis from the drop-down combo box. If the data swing exceeds the combo setting the Y-Axis will expand to accommodate it though.

To clear the graph send <CLEAR> to the serial port thus - Serial,println("<CLEAR>");

Let me know how you get in with it. My testing showed no memory leaks so I'm hoping it should be ok.

Chris
SerialPlotter.java
2017-01-15_21-47-06.jpg

Cristian Maglie

unread,
Jan 25, 2017, 7:04:27 AM1/25/17
to devel...@arduino.cc

May you to make a Pull Request on github?

C
> --
> You received this message because you are subscribed to the Google
> Groups "Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to developers+...@arduino.cc
> <mailto:developers+...@arduino.cc>.


--
Cristian Maglie <c.ma...@arduino.cc>

Chris Mower

unread,
Jan 25, 2017, 9:06:55 AM1/25/17
to devel...@arduino.cc
Hi Cristan,

what do you mean? Im new to this so I'm not sure how these things are done.

Regards,
Chris


> an email to developers+unsubscribe@arduino.cc
> <mailto:developers+unsub...@arduino.cc>.


--
Cristian Maglie <c.ma...@arduino.cc>

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.



--
Kind Regards,

Chris

Gabriel Staples

unread,
Jan 25, 2017, 10:01:53 PM1/25/17
to devel...@arduino.cc
Chris, start by making a Github account. If you use a Windows computer, also download the Github desktop application. Then, I'll let one of the more experienced developers provide more info on how they want you to add your software into the main project next. A "pull request" means that you are making changes to a fork (copy of) the main Arduino code, in order to incorporate your great contributions, then you are submitting a special request to the Arduino source code maintainers to please "pull" your changes into the main fork (source copy) for all to enjoy in all future versions of the Arduino IDE...


Thank you!

Sincerely, 

Gabriel Staples
Electric RC Aircraft Guy, LLC




--
Cristian Maglie <c.ma...@arduino.cc>

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.



--
Kind Regards,

Chris

Cristian Maglie

unread,
Jan 26, 2017, 4:52:24 AM1/26/17
to devel...@arduino.cc

Here some tutorials I found:

https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github

https://yangsu.github.io/pull-request-tutorial/

basically we use git as a version control system for the source code and
a pull request it's the process used on git to submit changes.

You start by cloning: https://github.com/arduino/Arduino

if you do that on github you'll get something like:
https://github.com/your_account_name/Arduino

after that you apply your change to your fork, using git "commit" and
"push" commands and finally, once your fork is updated with your
changes, you can submit a pull request that is more or less a request
"to pull changes from your copy of the repository to the main repository".

A pull request looks like this for example:
https://github.com/arduino/Arduino/pull/5878 and allows easier review
and comments.

It needs a bit of practice to get used to git but, believe me, it's
really worth it.

--
Cristian Maglie <c.ma...@arduino.cc>
Reply all
Reply to author
Forward
0 new messages