can't open serial monitor quick enough?

Hi,

I’m sending output to serial monitor but I can’t open it quick enough to check the output before it passes that point in the code.

This is probably a silly question but is there a way around it?

Thanks

Not quite sure what you mean.

I keep the Serial Monitor open while loading a sketch. At the moment that the IDE starts loading, I to the Serial Monitor. I only have experience with the Uno, but if I recall correctly, starting the Serial Monitor will restart the Uno.

Opening the serial monitor restarts the arduino so you shouldn't miss any of the code.

Of course there won't be any output to the serial mon. until serial has been initialized in setup(), but since that can be the first command after declaring global variables etc. that wouldn't be a problem.

So there must be another issue, post your code and be a little more specific about your problem.

Opening the serial monitor restarts the arduino

true for most Arduinos but not for the Leonardo, for instance.

This is probably a silly question but is there a way around it?

If it really is a problem then wait for a button press or a period to pass before doing the Serial output.

I keep the Serial Monitor open while loading a sketch. At the moment that the IDE starts loading, I to the Serial Monitor.

What do you mean by “loading a sketch” ? Using a Uno, if I have the Serial monitor open and I upload a new sketch to the Arduino the Serial monitor window closes.

UKHeliBob:
What do you mean by “loading a sketch” ? Using a Uno, if I have the Serial monitor open and I upload a new sketch to the Arduino the Serial monitor window closes.

IDE 1.6.6 on Windows8

I open the Serial Monitor from within the IDE (don’t know if there is another way).
Compile and upload; Serial Monitor does not close so is the usual way I switch to the Serial Monitor. Serial Monitor does ‘clear’ the screen (not sure if it’s at compile or at upload).

Yep, the changed in 1.6.6 :) Before that it closes the window.

But indeed, a Uno, Nano, Pro Mini, Mega all reset when you open Serial Monitor.

You could put delay(5000); at the top of setup() as a crude way to make the Arduino wait until you are ready. But this won't work with the Arduinos that use the 32U4 MCU as the Serial Monitor will not cause a reset.

...R

You can defeat the arduino reset due to open/close of the serial monitor using a resistor or capacitor.