Is there a way of preventing the reset when starting the serial monitor in the Arduino IDE?
There are two or three ways to prevent that reset: add a 10 μF capacitor from ground to reset; use a much-lower resistance for the pullup on reset; cut a trace from the serial-interface pin (eg CTS) that pulls reset.
The reason for this auto-reset circuit is to allow easy uploads to the Uno. With the original Arduino boards, you had to manually reset the board at the right time to make an upload. This is the origin of the practice of putting reset buttons on this class of Arduino board, even though that button is very rarely used.
The Serial Monitor is an essential tool when creating projects with Arduino. It can be used as a debugging tool, testing out concepts or to communicate directly with the Arduino board.
The Arduino is reset by opening the serial port (auto reset) and/or on power up. You can prevent the auto reset from the serial port, temporarily, by connecting a 10uf cap between the reset pin and ground. If using an electrolytic cap, make sure to observe polarity.
For the Uno, connect a 10μF capacitor between the reset and ground pins.
For other Arduinos, a 120 Ohm resistor (or equivalent resistance made up of multiple resistors, since 120 Ohms is quite rare on its own) between the 5V and Reset pins should do the trick.
The arduino Playground site has a quite detailed breakdown of different methods of preventing your arduino from restarting, with a bit of background and explanation.
http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With