Serial Monitor Character Input Speed Slowdown

Hello community,

I was just wondering how to slow down my type speed. Not like slowing down when each line or "Serial.print("{text}");" thing, but each character. Could you help? I'm very new to arduino and c++ coding so thanks.

Best regards,
4Jj

Select a low baudrate in Serial.begin() and Serial Monitor.

you mean you want the data to come to the Serial Monitor not as fast?
show your code.

My baudrate is at 300, but it's still too fast for my liking. When I look at the serial monitor, it's still just coming at what looks like an instant.

My code is simple, just serial.begin(300) and then serial.println("hello");

If you’re looking for a ‘typewriter’ effect , use any bitrate you want… then you’ll need to break the string down, and send the characters one at a time - any speed you like.

thank you for the information, this helps a lot. I'll still keep this post without a solution as I believe there is a faster and more efficient way to do this.

I just tried this method, and there is only one problem. It displays the text in a column (even with display settings changed).

don't use println(), use print() or write (with a char)

something like this could work for cStrings

const uint16_t waitTime = 250;

void printSlow(const char* text) {
  for (size_t i = 0; i < strlen(text); i++) {
    Serial.write(text[i]);
    delay(waitTime);
  }
}

void printlnSlow(const char* text) {
  printSlow(text);
  Serial.println();
}


void setup() {
  Serial.begin(115200);
  printSlow("Hello ");
  printlnSlow("World");

}
void loop() {}

(open you Serial Monitor at 115200 bauds)
the Arduino will be locked into the printing until all character have been sent, so it's not asynchronous;.

I let @drmpf talk about his buffered output solution and how you could possibly modify that to achieve what you want in a more general case (with all sorts of data)

Thanks. This helps.

I guess you're using println and not print, hence each character on a new line.

Ok. I will keep this in mind in the future. Thanks everyone!

4Jj

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.