Hello,
I used to suffer unvoluntary arduino board reset on Arduino NANO boards when stablishing a serial communication via USB from a Raspberry Pi running linux.
In order to prevent it I used a switch to connect or disconnect a 10 uF capacitor to the reset pin on the NANO board. This is very helpfull to allow uploading new sketches (disconnecting the capacitor from reset pin) or preventing the board reset when stabilish serial comm (by connecting back the capacitor to the reset pin).
This can be checked also with the Serial monitor from the Arduino IDE with the following simple sketch.
int counter;
void setup() {
Serial.begin(115200);
counter = 0;
}
void loop() {
Serial.print("Counter = ");
Serial.println(counter);
delay(500);
}
With this sketch running you'll see that everytime you close the Serial Monitor and open it up, the counter printed on the monitor is reset back to 0.
If you connect the capacitor to the reset pin on the Nano board, you'll see that you can close and open the Arduino IDE Serial monitor and the counter will not reset and continue adding up the values.
So far so good!!!
The issue appears with Arduino Nano EVERY board. In this case, the capacitor solution on the reset pin seems not to work anymore on this board.
I've read some solutions involving editing the Arduino IDE config files, or solutions that seem to avoid the possibility to further uploading future sketches on the board.
My question is that if there is any solution simillar to the Nano board that allows to easily prevent the reset or let to further upload new sketches by just switching on and off a capacitor.
Also, If interesting to anyone, Arduino Nano EVERY has two Serial monitors associated to the Tx/Rx pins (Serial1) and the USB port (Serial).