Change the X-Axis length on Serial Plotter

Hello,

The title is pretty descriptive. I'd like to sample at 2500 Hz and have the x axis length contain 5000 samples, giving a 2 second window. The reasoning for this is to sample above the Nyquist frequency of my expected signal.

Currently, the x axis length is set to 500 and I cannot figure out how to change it. It must be somewhere deep in the serial plotter settings, but I can't seem to find anything.

Does anyone know how I can change the X axis length on the serial plotter?

Thanks.

Unless your display has 5000 horizontal pixels, that doesn't really make sense.

Either oversample, and then send an average to the plotter, at a lower rate, or use a different plotter. The Arduino Serial plotter is very basic.

Pieter

The Java implementation of Serial Plotter sets the circular buffer depth to 500. I guess you'll have to go into the Java code and modify the constant BUFFER_CAPACITY. You can find the source here:

How you rebuild the Arduino app from source is above my pay grade.

Or you could skip (or average) samples to fit the number of samples you want into the display.

EDIT: On second thought, you could take that code out of the Arduino IDE and create a Processing project that does the same thing. "Processing" (See: Processing.org) is like Arduino except instead of writing C++ and running it on an Arduino you're writing Java and running it on a desktop or laptop.

Thanks for the responses. I'll definitely check out java and take a look at the source code.

You bring up a very good point I hadn't even considered - the length of the x axis is limited by the amount of pixels on my monitor. This makes me feel a little silly...

For anyone interested in the answer to this question, the easiest route is to oversample, and then take an average every "x" number of points. I've implemented a 10 point average and it's working quite well. When I have a bit more time, I'll mess with the java code and see if I can't get a ~1500 pixel window.