Serial monitor constantly closing

Hi!

I have to constantly reopen the serial monitor when uploading a new code to
my arduino board. For debuging purposes this can be very annoying.

Is there an option Im missing for the serial monitor?

Regards and thanks!

There can only be two things connected to the serial port at one time. If the Arduino is on one end, the other end can not be used by the uploader and serial monitor at the same time. So, the loader closes the serial monitor.

The alternative would be a stupid dialog box telling to that the serial monitor was open, so the upload could not be performed. Then, you'd have to dismiss the dialog box, close the serial monitor, and upload again. Then, open the serial monitor again.

Is there an option Im missing for the serial monitor?

It's not you that's missing the option.

PaulS:
The alternative would be a stupid dialog box telling to that the serial monitor was open, so the upload could not be performed. Then, you'd have to dismiss the dialog box, close the serial monitor, and upload again. Then, open the serial monitor again.

I don't see why it's quite that black-and-white. The serial monitor is not hard-wired to the serial port, it's just software.
Another alternative would be to leave the visible serial monitor open, but disconnect it, upload, then reconnect it.

Ok thanks!

Exactly Cylindric!! :slight_smile: Thats what I mean too!!

Maybe for a new version of the arduino IDE it wouldnt be that hard, software wise, to save the
state - opened or closed serial monitor - disconnect the serial port from the monitor (in the background, leave
the monitor openend maybe with a statustext saying: "Disconnected due to upload") upload the sketch
and re-connect the monitor if it was opened (Statustext: "Connected").

funtion uploadSketch(data){
	serialMonitorState = monitor.getState();

	if(serialMonitorState = "opened"){
		monitor.serialPortDisconnect();
		monitor.statusText = "Uploading";
	}

	arduino.serialPortConnect();
	arduino.uploadData(data);
	arduino.serialPortDisconnect();

	if(serialMonitorState = "opened"){
		monitor.serialPortConnect();
		monitor.statusText = "Connected. Ready."
	}		
}

That way it would be more of an automation rather than wating for upload and reopen the serial monitor
again and again. So its more of a one button magic! :slight_smile: I like something like that very much! :slight_smile:

I dont want to write a autohotkey script for that when it is so simple to implement in the IDE... :wink:

Hope someone of the developer team hears me!! :slight_smile:

I agree as well that it would make debugging easier - if you want the team to read it, you might consider making a request in the "Suggestions for the Arduino Project" section of the forum.

Ah cool, there is a section for requests! thanks for the input!

I upload with an ISP most of the time and use a standalone serial monitor --> if you have an ISP this is probably the best approach as it avoids the issue completely.

Cylindric:

PaulS:
The alternative would be a stupid dialog box telling to that the serial monitor was open, so the upload could not be performed. Then, you'd have to dismiss the dialog box, close the serial monitor, and upload again. Then, open the serial monitor again.

I don't see why it's quite that black-and-white. The serial monitor is not hard-wired to the serial port, it's just software.
Another alternative would be to leave the visible serial monitor open, but disconnect it, upload, then reconnect it.

That's exactly what happens with Eclipse. It's a big improvement over the Arduino IDE when it comes to debugging.

sixeyes:
That's exactly what happens with Eclipse. It's a big improvement over the Arduino IDE when it comes to debugging.

I already use eclipse for PHP - is it hard to set up for Arduino?

IMHO Eclipse is overkill. I use Kate. But if you are already used to Eclipse, why not.

I'd never used Eclipse, so for me, it was hard work. I had two attempts before success. I'm using Windows XP so if you're using a different OS it might be different. There are some good guides and I guess second time around I understood it better. If you already use Eclipse and you follow the guides it's probably straight forward.

You should be aware that you will lose the Arduino IDE's features of auto inserting function definitions and automatically picking up libraries just by including a header when switching to Eclipse.

Iain