How to stop Arduino from reseting after serial connection lost If I connect to an Arduino Uno via a serial console to read debugging statements and then disconnect, the Arduino appears to reset. How do I stop this from happening?

I'm trying to program an Arduino to receive a "shutdown" signal from a Raspberry Pi via serial, which will make the Arduino cut the RPi's power. However, this will also cut the serial connection, and if it causes the Arduino to reset, it'll reactivate power.
There is a link on the Uno marked RESET-EN which links the Atmega16U2 (or 8U2) which handles incoming serial data to the main chip, the Atmega328P. If you cut that link (eg. with a knife) then it won't reset. However uploading new sketches will be harder because you will have to manually press the Reset button when the IDE starts to upload a new sketch.



Board:





Schematic:





One thing that people do is put a 10 µF capacitor between RESET and GND. That holds enough current to "weather" the reset pulse, and that stops the board resetting. You can always remove the capacitor to reprogram the board.