Go Down

Topic: Serial Monitor closes automatically when downloading. (Read 3 times) previous topic - next topic

mechamania

Hi,
Each time when I download a program, the Serial Monitor is closed. I Always use the Serial Monitor for output. I would like to have it open all the time so that the loading of a program and running it is faster. Can that be done?

spycatcher2k

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

JimboZA

Quote
I would like to have it open all the time so that the loading of a program and running it is faster


Wow- how often are you uploading new code that it makes it so important?
Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

mechamania


Quote
I would like to have it open all the time so that the loading of a program and running it is faster


Wow- how often are you uploading new code that it makes it so important?


I just like to have short debugging cycles and it is annoying.
But maybe the most important thing is that I miss the first output from the Arduino serial port (see other post).

JimboZA

I don't think you miss the first output, because my understanding is that when you open the monitor it resets the board so your sketch starts again anyway.

That might in itself be a problem of another sort though.... 
Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

mechamania


I don't think you miss the first output, because my understanding is that when you open the monitor it resets the board so your sketch starts again anyway.

That might in itself be a problem of another sort though.... 


I really would like to open the Serial Monitor without a Arduino reset. But I guess that is not supported.

JimboZA

Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

mechamania


Read Reply#5 on this thread


If I understand corretly, this hack will also prevent a reset at upload. And that reset may be vital.

lostgdi

if you insisted, why not just put a delay after setup ?
As I know the arduino will also reset after your open operation. at less you have the chance to catch output of your expected.

mechamania


if you insisted, why not just put a delay after setup ?
As I know the arduino will also reset after your open operation. at less you have the chance to catch output of your expected.


Yes I guess that is best.

James C4S

An alternative to a delay is this:

Code: [Select]

void setup() {
  Serial.begin(9600);
  Serial.println(F("Waiting for 1 character"));
  while(Serial.read() == -1);
}


Set the return dropdown to "No line ending."   The program will wait until you send a single character before moving on.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

westfw

I think is a frequently-requested feature that the serial monitor be RE-opened after an upload, which would probably make the original poster happy.  Since the serial monitor and avrdude (used for uploading) are actually separate programs, they can't both have the serial port open at the same time.

Go Up