Serial print speed

As a learning exercise, I've written a sketch that prints voltages at a switch to the serial monitor.
Within the monitor window is a checkbox for time stamping each serial print.
For a sketch with little more than analog read and serial print, no delays, and a 9600 baud rate, the output seems renarkably slow - maybe 3 serial prints per second.

Is the serial print interval governed independently of the length of sketch and baud rate?

a character (byte) is transmitted every ~1 msec at 9600 bps.

i often see a 10 char line filling a screen w/in a second

so 3 prints/sec does seem slow.

For a sketch with little more than analog read and serial print, no delays, and a 9600 baud rate, the output seems renarkably slow - maybe 3 serial prints per second.

Please read Read this before posting a programming question then post your code using the advice given

Thanks Bob. I think your previous (brief!) reply was actually slightly more informative. :grinning::grinning::grinning::grinning: ... :grinning:

My question was intended to be specifically independant of task and was, perhaps, asked the wrong way. (I'm afraid I have a bad habit of asking questions on forums that are interpreted as something someone else wants to answer, rather than what I am trying to ask. I'll try agiain.)

Other than baud rate, delays, length of sketch, (eg) logical operator processing times, etc are there parameters / settings specifically intended to effect the rate serial.print() will write to the serial monitor?

How do we know what could be causing the problem without seeing you code ?

Maybe you are using a library with blocking functions, maybe you are using a blocking loop in the program, maybe you have several nested for loops with time consuming code at their inner level, maybe you are using multiple floating point calculations or a blocking function. Who knows ?

Post your code and we will try it on our PCs to eliminate the possibility of you having a hardware problem.

Whilst I genuinly appreciate what you're saying, and your willingness to spend time and effort helping.. I really don't mean to be contrary, so I'll try again:

If you wanted to limit the rate at which serial.print() text was displayed in the IDE serial monitor, without affecting any other function, is it possible, and if so, how would you do it? E.g. is there something in the IDE that would limit the rate at which a value was printed, irrespective of how quickly it was changing? Or perhaps is there a parameter or expression explicitly intended to be added directly to serial.print() in order to limit the rate a value is printed, irrespective of the rate it changes?

Unless you post your code I am afraid that I can offer no more help

Good luck with your project

What is the "little more than"?

idrisdraig:
If you wanted to limit the rate at which serial.print() text was displayed in the IDE serial monitor, without affecting any other function, is it possible, and if so, how would you do it? E.g. is there something in the IDE that would limit the rate at which a value was printed, irrespective of how quickly it was changing? Or perhaps is there a parameter or expression explicitly intended to be added directly to serial.print() in order to limit the rate a value is printed, irrespective of the rate it changes?

  1. blink without delay
  2. no
  3. no

Another technique to limit the amount of serial data is to only print the variable when the value changes.

“Whilst I genuinly appreciate what you’re saying, and your willingness to spend time and effort helping… I really don’t mean to be contrary, so I’ll try again:”

To put your code in a code box, use the </> icon in the far left of the post tool bar and paste your code between the two bracket sets that appear.

To go back and put your code in a code box, in the bottom right of your post, select “more” and click modify. When the modify post opens, high light your code and click the </> in the far left of the post tool bar. This will put you code in code brackets. Then save the changes.

idrisdraig:
If you wanted to limit the rate at which serial.print() text was displayed in the IDE serial monitor, without affecting any other function, is it possible, and if so, how would you do it?

The same way you would do anything at intervals:

void loop()
{
    unsigned long currentTime = millis();

    static unsigned long lastTimeSerialOutput = 0;
    const unsigned long serialOutputInterval = 5000;  // Five Seconds
    if (currentTime - lastTimeSerialOutput >= serialOutputInterval)
    {
         lastTimeSerialOutput = currentTime;
         Serial.println("This is your every-five-second update.");
    }

    // Do other stuff here
}

idrisdraig:
E.g. is there something in the IDE that would limit the rate at which a value was printed, irrespective of how quickly it was changing?

No.

idrisdraig:
Or perhaps is there a parameter or expression explicitly intended to be added directly to serial.print() in order to limit the rate a value is printed, irrespective of the rate it changes?

No.

If you want to do output at intervals, do output at intervals.

It looks like the consensus is No. Thanks for all the responses.

Serial print is a blocking function at the moment you start printing too much.