-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Adding plotting functionality to the editor #2177
Conversation
This sounds like an intriguing, if not very specific feature. Any chance you could add a screenshot and some examples of the corresponding strings sent through serial? I'm curious :-) |
I went for the most simplistic option with this: everything coming in on the serial port is split with every new line, whitespace is trimmed and the left over string is parsed as a double. This assumes there's only one value being send and that it is send as a string. Of course this could be extended to, e.g., use the raw byte values, allow users to specify separators, show multiple graphs, etc. Again: I first tried to get the basic thing in there. |
Please Merge this! This would be an awesome feature. Just like Processing has a Color Picker under the "Tools" bar, so should Arduino have this specific "Graph" feature. P.S. Your proposed Graphing Icon is really awesome! |
+1 !! |
@henningpohl can you please rebase/merge your PR with the current master? It doesn't merge any more |
So, my PR now is quite old and a lot of things seem to have changed in the codebase. Also around SerialMonitor. If I update my code, should the plotter also extend AbstractMonitor? Conceptually that would make sense. However, AbstractMonitor isn't really that abstract. There are already a whole bunch of UI components in there which would not be needed for plotting. That could be moved to an AbstractTextualMonitor or something like that. But that would be a larger change. Any thoughts? |
Well it's abstract as far as serial and network monitors are concerned. Sure a plotter monitor requires more abstraction, or a totally independent code. I would do the minimum for making it viable and still be, if not proud, at least convinced of the quality of the code. |
Alright, I got everything to compile and work again. It would be great if somebody more familiar with the codebase could have a look. I mostly tried to go by what was in place in SerialMonitor and AbstractMonitor, but might have misunderstood some intentions here or there. |
@ArduinoBot build this please |
👍 !!! |
Hmm... I tested this on Ubuntu 14.04 (64 bit) in a VM and on Windows 8 (64 bit) and the serial port closed on both. I think I did find the problem though: if one tries to open the serial monitor/plotter while the other window is open, that fails but puts the application in a state where opening will also fail in the future even if the other window is closed. I added a check for that and switching between both windows should now work. The better solution would be to have the serial connection somewhere central in the editor and allow any number of subscriptions to incoming data elsewhere. But that probably would be a larger change on its own. |
74028a8
to
fc3e295
Compare
@ArduinoBot build this please |
Awesome pull request, definitively a feature I want to have in the IDE! (if possible in the future something in the lines of https://code.google.com/p/arduinoscope/ would be even better, but this is a fantastic start!) |
This is a really nice feature, and it works really well. I can see many ways it can be expanded into a super useful tool while keeping the interface as basic as possible. |
Wish I had the opportunity to test this but I'm happy to see this feature come!! 👏👏👏 |
@Mixania you still have it: code still needs to be merged |
@ArduinoBot build this please |
@ArduinoBot build this please |
Serial plotter is available in BUILD 317 but it is not in 1.6.5. Why? |
Because we chose to postpone this feature
|
@henningpohl after some consideration, we would like to merge this feature. However we are puzzled by the added button next serial monitor one: we think either it won't get noticed or it will confuse users. Is removing the button and leaving the menu entry under |
Great! I'd be fine with removing the button. Would it be an option to leave the image in buttons.gif though? While adding a button to the interface is an easy change, recreating an icon is a bit more work. There might be a button in the future, or the icon might be used in the window title. I could alternatively also make removal a dedicated commit, keeping the larger buttons.gif in the history. I'm also out of office right now, so can't properly test changes. I will update this and get it ready early next week. |
The changed image is already in the history. If you prefer, it's ok to edit buttons.gif in a dedicated commit |
Adding plotting functionality to the editor
Thanks! |
Could it be possible to add to Serial Plotter the ability of recognize several serial streams to be able to paint several graphs accordingly?? I mean...I'd like to see on Serial Plotter the evolution of data got by two different analog sensors at the same time, in two different coloured graphs. |
I found debugging Arduino projects with, e.g., time-varying capacitive sensor values rather tedious with the serial monitor. I added a graph view that makes it easier to observe such changes.