Serial monitor stuck and keep printing the same thing?

Hi folks!

Just wondering, have you guys encounter this problem before?

I'm using Arduino Nano, and "Serial.begin(115200)" to print out the value like this:

21:00:48.335 -> Value= 1
21:00:48.335 -> Value= 2
21:00:48.383 -> Value= 3
21:00:48.383 -> Value= 4
21:00:48.383 -> Value= 5
21:00:48.383 -> Value= 6
21:00:48.383 -> Value= 7
21:00:48.383 -> Value= 8
21:00:48.383 -> Value= 9
21:00:48.429 -> Value= 10
21:00:48.429 -> Value= 11
21:00:48.429 -> Value= 12
21:00:48.429 -> Value= 13
21:00:48.429 -> Value= 14
21:00:48.429 -> Value= 15

Not very often, but sometimes it will "stuck" and keep printing the same timing:

21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1
21:00:55.585 -> Value= 1

As you can see, the timestamp stop at "21:00:55.585" and It will back to normal after 1 or 2 sec...

Any idea? I suspect the problem is due to the "Serial.begin(115200)" speed is too fast and caused the error?

:slight_smile:

Regards
Guy

We can't see your code.

It is probably something in the code but it could be hardware as well. Post your code, there are instructions on how to do it. click the < / > icon type or paste code here paste your code where it says “type or paste code here” Is there anything else connected to the Nano? If so what? How is it powered?

Those timestamps are generated by Serial Monitor on the PC and represent the time the message arrived.

Even with the count incrementing it is acting very strangely. Seven messages arrive in 1 millisecond and then a gap of 46 milliseconds and at least six more messages in a millisecond?!?

What ever it is it is not what you suspect.

Without a schematic and code all we can do is guess.

Here is a guess. Are there any relays or motors being turned on or off? If so you need to suppress them by adding decoupling components.

That you can easily test by changing the baudrate in both serial monitor and arduino board :smiley:

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