# Look like Arduino reboot when open and close Serial monitor

**URL:** <https://forum.arduino.cc/t/look-like-arduino-reboot-when-open-and-close-serial-monitor/362206>\
**Category:** IDE 1.x\
**Created:** [January 31, 2016, 9:43am UTC](https://forum.arduino.cc/t/look-like-arduino-reboot-when-open-and-close-serial-monitor/362206 "2016-01-31T09:43:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vdiallonort](https://avatars.discourse-cdn.com/v4/letter/v/ed655f/32.png) [@vdiallonort](https://forum.arduino.cc/u/vdiallonort)\
**Post date:** [January 31, 2016, 9:43am UTC](https://forum.arduino.cc/t/look-like-arduino-reboot-when-open-and-close-serial-monitor/362206/1 "2016-01-31T09:43:04Z")

</div>

Hi,

I got something that i don't understand. I write a really small program which is bellow :  
int i;  
void setup() {

Serial.begin(9600);  
Serial.println("Begin of the program");  
}  
void loop() {  
Serial.println(i);  
i++;  
delay(1000);  
}

So i expect when i open an close the serial monitor to see to counter going up and up but for some reason if i close it and re-open it see my loop starting from the beginning again ( See printscreen bellow ).  
Does anyone know how to avoid this behavior (what should i add to my program) ?

---

<div class="post-metadata">

**Author:** ![Fruchti](https://avatars.discourse-cdn.com/v4/letter/f/f9ae1b/32.png) [@Fruchti](https://forum.arduino.cc/u/Fruchti)\
**Post date:** [January 31, 2016, 12:28pm UTC](https://forum.arduino.cc/t/look-like-arduino-reboot-when-open-and-close-serial-monitor/362206/2 "2016-01-31T12:28:17Z")

</div>

Performing a reset is the standard behavior of the Arduino IDE when opening Serial Monitor. There is nothing you can do within your program to prevent that.

---

<div class="post-metadata">

**Author:** ![dmjlambert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dmjlambert/32/221001_2.png) [@dmjlambert](https://forum.arduino.cc/u/dmjlambert)\
**Post date:** [January 31, 2016, 3:37pm UTC](https://forum.arduino.cc/t/look-like-arduino-reboot-when-open-and-close-serial-monitor/362206/3 "2016-01-31T15:37:05Z")

</div>

> vdiallonort:  
> Does anyone know how to avoid this behavior

After you upload your program to the Arduino, disable auto reset upon serial connection by putting a 10uF or larger capacitor with positive side to RST and negative or striped side to GND. Remove the capacitor the next time you want to upload.

ATmega32U4-based boards do not auto reset upon serial connection. So if you get a Micro, Leonardo, Pro Micro, Beetle, etc. it will not auto reset when you open serial monitor.

---

<div class="post-metadata">

**Author:** ![vdiallonort](https://avatars.discourse-cdn.com/v4/letter/v/ed655f/32.png) [@vdiallonort](https://forum.arduino.cc/u/vdiallonort)\
**Post date:** [January 31, 2016, 10:51pm UTC](https://forum.arduino.cc/t/look-like-arduino-reboot-when-open-and-close-serial-monitor/362206/4 "2016-01-31T22:51:06Z")

</div>

Thanks guy ! So if it's a behavior from the IDE if i watch the Serial through a program i should not have this behavior too ? I also gonna try with the capacitor.

Vincent

---

<div class="post-metadata">

**Author:** ![dmjlambert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dmjlambert/32/221001_2.png) [@dmjlambert](https://forum.arduino.cc/u/dmjlambert)\
**Post date:** [February 1, 2016, 1:36am UTC](https://forum.arduino.cc/t/look-like-arduino-reboot-when-open-and-close-serial-monitor/362206/5 "2016-02-01T01:36:45Z")

</div>

It is not behavior of the IDE. It is opening the serial connection from any program which causes auto reset. Arduino Uno and Mega have a jumper trace you can cut called RESET-EN. If you cut the trace between the pads it will no longer auto reset. You can solder in place jumper pins or a switch, or just put a solder blob across the pads to re-enable it. When auto reset is disabled, you would have to press and release the reset button during upload for uploading to work. The capacitor is the way to disable auto reset without modifying the board.

---

<div class="post-metadata">

**Author:** ![vdiallonort](https://avatars.discourse-cdn.com/v4/letter/v/ed655f/32.png) [@vdiallonort](https://forum.arduino.cc/u/vdiallonort)\
**Post date:** [February 1, 2016, 5:08am UTC](https://forum.arduino.cc/t/look-like-arduino-reboot-when-open-and-close-serial-monitor/362206/6 "2016-02-01T05:08:07Z")

</div>

Hi thanks, The weird thing is i also have the same behavior with an FTDI board (this one from sparkfun [SparkFun USB to Serial Breakout - FT232RL - BOB-12731 - SparkFun Electronics](https://www.sparkfun.com/products/12731) ) Does a capacitor will help ?

Vincent

---

<div class="post-metadata">

**Author:** ![dmjlambert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dmjlambert/32/221001_2.png) [@dmjlambert](https://forum.arduino.cc/u/dmjlambert)\
**Post date:** [February 1, 2016, 2:17pm UTC](https://forum.arduino.cc/t/look-like-arduino-reboot-when-open-and-close-serial-monitor/362206/7 "2016-02-01T14:17:16Z")

</div>

How can an FTDI board reset? It does not have a processor on it. It is just a USB-to-serial converter.

---

<div class="post-metadata">

**Author:** ![Budvar10](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/budvar10/32/215868_2.png) [@Budvar10](https://forum.arduino.cc/u/Budvar10)\
**Post date:** [February 1, 2016, 2:30pm UTC](https://forum.arduino.cc/t/look-like-arduino-reboot-when-open-and-close-serial-monitor/362206/8 "2016-02-01T14:30:35Z")

</div>

> dmjlambert:  
> How can an FTDI board reset? It does not have a processor on it. It is just a USB-to-serial converter.

If the DTR or RTS is connected to the RESET pin.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 5, 2021, 4:08pm UTC](https://forum.arduino.cc/t/look-like-arduino-reboot-when-open-and-close-serial-monitor/362206/9 "2021-05-05T16:08:03Z")

</div>

Closed on May 5, 2021, 4:08pm UTC


