Copy/Paste problem from Serial Monitor

Hi all,

This is my first post here. I am not super expert in Arduino but I wanted to share a late issue I had and how I found the error. I read lots of post here that did not solve my problem. I finally found the origin of it and how to resolve it. I used Arduino Mega 2560. A simple project to mesure resistance of a wire. Ok, here you are...

Problem: Not able to copy and paste all the data from the serial monitor values.

I selected all data with Ctr + A and Ctr + C from the serial monitor in Arduino.

The paste funcion Ctr + V, does not work in any text program (e.g. excel, notepad).

I had this data:
12:37:12.167 -> R2: 2400.00
12:38:12.178 -> R2: 2502.50
12:39:12.202 -> R2: 2502.50
12:40:12.214 -> R2: 2400.00

when selecting all, copy and paste, I obtained this:
12:37:12.167 ->

Then I tried selecting all the data except for the first data point. That worked.

Then, I realized I run the sketch twice. It seems every load of the sketch makes a single data section. You cannot copy all of it together (aparently that was my problem).

I found that if I clear the serial monitor I am able to copy all the data. Then, I run the sketch again, then I could not copy the whole console anymore and only the data by the time the sketch was run (by scrolling and selecting).

Solution: press run sketch and do not do it again if you want to save the whole serial monitor. My sketch runs continuously with a "delay()" function, so I just have to be careful and do not load it again.

I hope that help others facing the same problem.

If you have valid data in the CP buffer then PASTE rather than use CTRL/V.
You can also halt the serial monitor to CP specific lines too.

The serial monitor included with the IDE is not as robust as many other serial programs that are available such as PUTTY, TERATERM etc.

There are even simple programs available that will pass the data directly to EXCEL to provide live charting etc.

If I want to copy text from Serial Monitor while it is being updated, I often just disconnect the board from the PC and next copy and paste.

Unfortunately one has to restart the Serial Monitor after the board is connected again.

I agree that Serial Monitor is not the most ideal tool but it does the job. It’s massive advantage over other terminal programs is that it is controlled by the IDE during uploads; if you do an upload while the Serial Monitor is open, the IDE closes the port, uses it for the upload and next opens the port again.

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