Giter Club home page Giter Club logo

betterserialplotter's People

Contributors

nathandunk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

betterserialplotter's Issues

ttyUSB not working

I have cloned your repo and compiled it (but also tried with your latest binary), I have an ESP32, with a "demo sketch" (just a few prints and nothing more) printed values can be seen on the IDEs (both old and new) serial monitor/plotter and via gtkterm, but BetterSerialPlotter gives errors such as:

  • unable to get portstatus: Bad file descriptor

  • invalid baudrate

on /dev/ttyUSB0

I have tried various baudrates, same result

Overwriting plot visualization

Hi, I am looking for a serial plotter with an "overwriting" style, meaning that when the x axis reaches the end it restarts from left and overwrites the previous plot. In some cases, this would help the readability of the data. Here is an example.
Is there a way to do it with BetterSerialPlotter? I would love it. Thanks.

Export CSV truncates decimals

Hi! Using this feature, float values get their decimal part truncated. The Serial monitor tab output looks ok, only the file exported has this issue.
OS: Manjaro Linux
Thanks!

Connection to ttyACM0 supported?

Hi there, I have connected my AUNO to my linux box and Arduino IDE finds it on port /dev/ttyACM0 (ACMZERO). But in BSP it shows up with a alternating green/red flickering for () and something is plotted. The scetch I have uploaded is
https://github.com/upsidedownlabs/BioAmp-EXG-Pill/blob/main/software/EMGEnvelop/EMGEnvelop.ino

In the terminal from where I have started BSP it writes:
unable to get portstatus: Bad file descriptor

I do set the baudrate to 115200.

Any suggestion what is wrong?

Support for label names

Hi,

apparently no support for labels? Eg. serial output
x:10 y:20
does not give me any data at all. This is supported in arduino gui serial plotter.

When I remove the labels it works. In my opinion support for this should be included, it's very useful for knowing what the serial output actually means.

Data not updating

while sending the data , the plotter is updating the first value but second and third values are constant, could you please give an update on this.

add support for /dev/rfcommX for linux

Dear Developer
I am interested in using BetterSerialPlotter under Linux.
I am using serial over Bluetooth (HC06) to communicate with hardware Arduino Uno.
Under windows, the Bluetooth binding to COMX has the same name format as other serial ports and successfully detects and works by BetterSerialPlotter.
But under linux the bluetooth binding to /dev/rfcommX and can not detect by BetterSErialPlotter (may be because different name format /dev/ttyUSBX).
Could you help me with how to make BetterSerialPlotter can detect the /dev/rfcommX?
Thank you very much for your help.
Best regards,
Irwandi

add support for comma as field separator

Following this tutorial from the official arduino.cc docs I wrote a sketch that sends a comma in between variables. Indeed, it works fine with the plotter built into the IDE. Furthermore, it conforms to the somewhat standard CSV format. (e.g. the same output can be sent to the plotter and saved to SD resulting in a file readable by spreadsheet programs)

However with commas on BSP I only get the flashing com port field indicating data received, no plots or anything else. However, upon replacing the commas for spaces, it works as expected.

Upon digging I found the official specification for the protocol inside the IDE source. I believe commas should be added to fully conform as a drop-in replacement.

crash on load config

Hi -

awesome tool -- I hope you keep developing.

My apologies if this is known or in docs somewhere -- when i attempt to i get to the file selection menu and can choose the config file -- but causes the app to crash.

this happens for configs with 1, 2, and 9 data streams.

running OSX - 12.6.3

s

Does not plot on macOS Apple M1 Max

The project looks amazing and can't wait to start using it on macOS. The program detects the ports correctly, and after setting the correct bound rate, I cannot see the plots. The Serial Monitor works fine.

The Arduino IDE Serial Plotter works fine on macOS, so perhaps the program requires some additional settings or dependencies.

It was tested on:

OS: macOS Sonoma 14.4
Chip: Apple M1 Max

Plots:
Screenshot 2024-03-18 at 13 47 20

Serial Monitor:
Screenshot 2024-03-18 at 13 47 39

Thanks a lot in advance for your support.

Multiple "Y" axies ...

This is a very usefull and flexible tool, but may I suggest a couple of enhancements ...

  1. Is it possible to have more than 2 "Y" axies per plot?? I often need to plot more than 2 data streams on the same plot (for comparison purposes) with widely differing Y ranges. Having, say 4 or 5 axies would be very usefull, in the same color as the stream.

  2. Having a "Help" button would be usefull too.

Regards,
Dave

how to compile on windows

Downloaded the project and VSCode but upon trying to compile it is asking for cpp compiler and no matter what I select either i get an error or project configuration (include errors). I tried mingw and all the things vscode offered.

Is there a guide how to compile this project on windows somewhere (what ide, what compiler) ?

Zoom and pan of plots not saved with config

Saving and reloading config will remember things like the naming and plot layout you arranged, including whether a plot is set to auto scale. However, if you zoom a non-auto-scale plot (mouse scroll wheel on a plot) and pan the number scale to a specific setting (click and drag up/down), save and reload config, it is LOST. You have to redo your zoom and pan every time on each plot because it's not saved.

Data not received

I'm on Mac with macOS 13.1 and I'm trying to set up BSP to visualize the states of four pneumatic cylinders and some other parts.

The Arduino IDE shows the data in serial plotter just fine but BSP doesn't.
I selected the port (tty.usbmodem142401) and the corresponding baud rate (9600). But both selections stay red and the incoming data section stays empty.

Did I miss a step? I couldn't find any further information.

Bildschirm­foto 2023-02-22 um 12 10 44

Bildschirm­foto 2023-02-22 um 12 13 02

SerialMonitor output in BSP works fine.

Bildschirm­foto 2023-02-22 um 12 26 38

Can't read data from board

I downloaded the Windows v0.1.1 zip from the release page and tried to run a simple program that reads from a potentiometer and draws it. It works fine with the built-in plotter, but the app doesn't detect any signal. Also, I tested the example codes, and still the same. What should I do to run that?

void setup() {
  Serial.begin(9600); 
}

void loop() {
  Serial.println(analogRead(A0));
}

image

Periodically stops plotting even when new values visible in serial monitor tab

I am using an ESP32, sending 5 whitespace separated values over serial at 115200 baud. Running on Windows 11.

The values update responsively in the serial monitor tab of BSP, however the plot screen sometimes just stops plotting even though it is still receiving data.

image

In this image, you can see the graphs for data 0, 1, and 2 have lines that stop partway through. (Unaligned because of different time scaling) After a few seconds it will come back and retroactively graph the old data all at once. So it's still receiving it, just not plotting it right away.

Built in help

Clearly a lot of thought and hard work has gone into this :-) I love it !

Can I suggest that built in help should be added - even if all it does is launch the "readme.md" file.
Having to go to the web site for guidance is a bit of a pain.

Or even perhaps a "demo" mode like what "pulseview" has - but perhaps there is a lot of work in that and may not be worth it.

Dave

Is it possible to send binary data (using Serial.write) to achieve better performance and feed more data with the same baud rate?

If we calculate, what the baud rate needed if we send audio samples data at 10kHz from 12-bit analog pin using Serial.println on Windows:

  • Each sample will convert into 4 digits + 2 characters (\r\n) = 6 characters total = 6 bytes * 8 = 48 bits.
  • 10'000 samples/second × (48 bits + 2 (start and end)/sample) = 500'000 bits/second (needed baud rate).
    As we can see, the value is huge here…

With raw data it could be: 10'000 * (12+2) = 140'000 bits/second (baud rate)

Variable Buffer Size

Hi, great project!

I sometimes have many datapoints, exceeding the internal Buffer. Would it be possible to add a configurable sized buffer?

Also, a Checkmark with "endless" would be nice so that the software will just keep going as long as you want. Could be done with chunks of allocated heap, when exceeding just add a new chunk.

  • With buffer i mean the plot in the scrollable viewport

Core dumped

The plotter crashes with a coredump when receiving too much datapoints.

BetterSerialPlotter: /home/X/dev-new/BetterSerialPlotter/build/_deps/mahi-gui-src/3rdparty/imgui/imgui.h:1672: T& ImVector<T>::operator[](int) [with T = ImVec2]: Assertion `i >= 0 && i < Size' failed.
Aborted (core dumped)

Inconsistent port opening behavior

I use BSP somewhat regularly but infrequently, maybe like once every few weeks or months. I'm suddenly running into a couple of possibly related issues trying to plot data from some CircuitPython/MicroPython devices (maybe related, maybe not).

The first I'm experiencing with a CircuitPython 7 PyPadge. I CAN open the serial port in BSP, but it'll only plot every few tens of samples, and the port looks closed the entire time until the sample that comes in that kicks off the plot. If I open SerialMonitor, you can see every line comes in on the half-second interval I've got programmed, but the data in the left sidebar rarely updates. When it does, the plot re-draws, and fills in all "missed" samples as well. Notably, the red serial port background flashes off as well, as if it "connected" for that one sample.
I've recorded a video where the sawtooth should be filling in evenly, but we see that it jumps (without dropping samples), and the sidebar only every few samples.
https://user-images.githubusercontent.com/107648830/188756263-022d7659-c365-4514-9755-b6102f20ae45.mp4

The second is that I simply CANNOT open devices with a high COM port number. For instance, one was assigned COM18. I can open this with Putty just fine, but BSP won't attach. If I attempt in BSP, I can still connect with Putty even after I've selected the port in BSP trying to open it.

If I open device manager and manually re-assign a lower port number (I've tried 6 and 5), that works.

does not plot

Oy, it's beautiful, can't wait to get it working. But in Windows 11 though the serial monitor is streaming plain old integers sadly it will not plot them.

Compiling On Linux

After a successful compilation on Arch Linux (Kernel 5.10.82-1-lts) I get the following assertion error.

BetterSerialPlotter: /home/christoss/Documents/fromSource/BetterSerialPlotter/build/_deps/mahi-gui-src/3rdparty/imgui/imgui.cpp:7784: void ImGuiStackSizes::CompareWithCurrentState(): Assertion `SizeOfIDStack == window->IDStack.Size && "PushID/PopID or TreeNode/TreePop Mismatch!"' failed.
fish: Job 1, './BetterSerialPlotter' terminated by signal SIGABRT (Abort)

The older precompiled version works just fine.

Suggestion - Sending messages to device

Hi!

Thank you for the amazing app. It's really nicely done.
I would like to suggest a feature, which would make our use case (and maybe others) a bit more complete:

The feature would allow you to send a message to the serial device, which then can respond with the data stream. This would be similar to the text box in the Serial Monitor of the Arduino IDE. In our particular case, these type of messages are a way to trigger data streams of sensors in our hardware.

Would you consider something in that regard?

Crash when importing configuration

The app always crash when i try to load my configuration JSON.
It's maybe too heavy.

I'm on mac m1 2020.
I see no peak of memory consumption while opening the file

Please fine my config json attached.
fc_config.json

x vs y plot is painfully slow

Der Nathan.

Thank you for putting this phenomenal app together.

I am having some issues with the plotting speed when using one of the values as the x-axis (time for instance).

Something like:

...
    Serial.print(t, 4);
    Serial.print("\t");
    Serial.println(abs(echem_res));
...

Disabling the t data values gives me a better speed.

Any idea why this could be happening?

Cheers

Suggestion - Allow temporary release of the com port

Well, this is awesome, and I'll stop using the Arduino IDE for serial monitoring/plotting.

Am wondering if it's possible to temporarily release the com port, so I don't have to exit and restart 'Better Serial Plotter' each time I re-compile/upload to my board of choice.

Suggestion: Add a Dash view with both plotted and non-plotted graphics

OK, this is probabaly WAY off scope for this project (or certainly a v2.x), but I have to toss this out there.

It would be TOTALY cool if we could represent data in custom ways, probably using python to describe graphics, in addition to plotting.

Example:
A motor with an encoder shows the position of the motor as well as full 360 rotations, but also direction (forward/reverse). Here we see Direction appearing as basically HIGH/LOW.
image

Above is good if you want to see behavior of things at any given point in time.

Also valuable, however, is to have a simple view showing CURRENT state of certain sensors, along with plotted data. So for example, if I don't care about the historic data of Direction, and I just want to see what CURRENT state it is right now, along with other plotted data.

image

Above, I've theoretically converted 0 or 1 to "Forward" or "Reverse", which is reflected in a simple graphic, and "data 0" 0 or 1 ended up being "on" or "off" in this example, each with their respective "modules", showing the last known (current or real-time) state. The module, BTW, might contain something like this simple python script that takes a single serial data value and renders it graphically.

Doing this allows for essentially the creation of "Dashboard" views while working on projects. Best case scenario, it could be done, perhaps, with simple custom modules defined in Python, and able to be placed on the canvas.

The blue vertical line, BTW, could be a "scrubber" wherein if you "pause" the real-time feed for a snapshot, you move that line back and forth and see the state of values (such as Direction, or data 0, or whatever) at that point and time.

Custom Start Logging and Stop Logging Buttons; Open Comport; Custom Scaling Option

Nathan First of all Better Serial Plottet is Great for what it comes with.

Adding Few Suggestions on the Logging part for CSV.

  1. Logging
    BPI starts to log everything in the csv file the moment it starts to recieve data.

If we have two buttons for Start Logging and Stop Logging Buttons, we can use it save the values in the desired time than the entire plot.

  1. Close Comport Works as expected, How about adding Open Comport.

  2. Auto Scale and Scroling for adjusting the scaling works perfectly, if we can add an custom range for scaling option would be great on both x and y axis

Thanks and Regards
Deva

Suggestion - Custom baud rate

Im using a higher baud rate than what this plotter allows me to use. A fix would be to allow any baud rate instead of only a number of pre-defined ones.

Setting data labels of the BSP from the device application

Hi,

Thank you for the great application.
I would like to suggest a feature, which would make life easier with setting the data labels.
So, taking your demo with the suggestion would look like:

void loop(){
    // get all of our variables of interest
    float t = millis()/1000.0;
    float var_sin = sin(t); // sin(t)
    float var_cos = cos(t); // cos(t)
    
    // write them all to console with tabs in between them
    Serial.print("Time\t");
	Serial.print(t);         // first variable is program time in seconds. This can be plotted on an x-axis!
    Serial.print("\tSine\t");
    Serial.print(var_sin);   // second variable is sin(t)
    Serial.print("\tCosine\t");      // this last "\t" isn't required, but doesn't hurt
    Serial.println(var_cos); // third varible is cos(t). make sure to finish with a println!
    
    // For example, at 2.5 seconds, this prints out like so, where \t
    // is the tab character, and \n is the newline character
    // 2500\t0.598\t-0.801\t\n
}

Where the data labels are 'Time', 'Sine', 'Cosine'.
The logic is that any non digit character (excluding the minus sign '-') till the white space is the preceding label of the data.

Other, more complex idea, is to be able to send the setting (json or other format) from the application to the Plotter so no setting at all (besides com port setting) is necessary.

Thank you for consideration.

IM_ASSERT "PushID/PopID or TreeNode/TreePop Mismatch!" with x64, Windows MSVC

Hi,

I'm trying to build the BetterSerialPlotter on Windows using Visual Studio 22.
When executing, the IM_ASSERT "PushID/PopID or TreeNode/TreePop Mismatch!" fails.
A comment states, that this assertion is intended to detect usage errors of ImGui.

Is it possible, that there is actually a usage error of ImGui/mahi-gui?

Thanks!

Support for Larger Baud Rates?

Incredible work with this Serial Plotter tool. I was keeping Arduino just for it's serial plotter function but yours is much better and completely replaces that.

Is it possible to support higher baud rates like 460800, 921600, etc. ? A number of recent arduino compatible boards like Sparkfun's Artemis have USB-serial chips that can tolerate much higher baudrates. I tried adding more baud rates in the header file:

std::vector<int> baud_rates = {110,
300,
600,
1200,
2400,
4800,
9600,
14400,
19200,
38400,
56000,
57600,
115200,
128000,
256000};

But that didn't seem to work. Any suggestions?

serial plotting different between Pico and Pico W

I have tried the BetterSerialPlotter with the RP Pico W programmed with micropython and arduino core from Earlephilhower and it works fine.

I have tried the same code on the RP Pico without the wireless option and the BetterSerialPlotter doesn't work either way( Programmed with micropython or Arduino-Core). I have checked the schematic and there is no differrent between the USB communikation.

On other serial monitors and the Arduino Serialplotter i see the data.

I don't know the reason of the Problem. Can Someone help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.