Pages: [1]   Go Down
Author Topic: Serial Monitor closes automatically when downloading.  (Read 3534 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Scotland
Offline Offline
Edison Member
*
Karma: 26
Posts: 1341
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It locks access to the serial port - so no.
Logged

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

Johannesburg. UTC+2
Offline Offline
Faraday Member
**
Karma: 106
Posts: 4692
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

The Elders of the Internet know who I am
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

Johannesburg. UTC+2
Offline Offline
Faraday Member
**
Karma: 106
Posts: 4692
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.... 
Logged

The Elders of the Internet know who I am
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Johannesburg. UTC+2
Offline Offline
Faraday Member
**
Karma: 106
Posts: 4692
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Read Reply#5 on this thread
Logged

The Elders of the Internet know who I am
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
Ellie Goulding - Lights (Bassnectar Remix)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

An alternative to a delay is this:

Code:
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.
 
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6788
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: