Skip to main content
Share Your Experience: Take the 2024 Developer Survey
9 votes

How do I repurpose Arduino's reset button

If you just want the reset button to change the program mode, the simplest thing would be to let the button reset the Arduino and switch modes each time your program restarts. Then you do not need to ...
Edgar Bonet's user avatar
  • 43.3k
7 votes
Accepted

Two function Reset button - long/short press

It can be done with one button, one resistor, one capacitor and one GPIO pin (in addition to the RESET pin): simulate this circuit – Schematic created using CircuitLab Pressing the button ...
Majenko's user avatar
  • 105k
6 votes
Accepted

Disable Reset when Com Port Connected/Disconnected

If you review the Uno schematic, you can see the circuitry that enables an automatic reset when serial communication starts. The circuitry is intended to allow easy program downloading. There are ...
James Waldby - jwpat7's user avatar
5 votes
Accepted

Why is there a limitation in using Serial.println on ESP8266?

It's happening because you're not giving the ESP8266 a chance to do its housekeeping activities and the watchdog (which is enabled by default) is timing out - as evidenced by the very first line of ...
Majenko's user avatar
  • 105k
5 votes
Accepted

Is there any way I can stop the Arduino Mega 2560 from resetting all variables after losing and reconnecting power?

Save the variables you need to EEPROM.
Gerben's user avatar
  • 11.3k
5 votes
Accepted

ESP8266 - Sending a software Reset Command

1/0 is an exception (divide by zero). esp8266 arduino core has soft reset: ESP.reset(). Calling this function you get a valid reset. Note to software reset. esp8266 has a bug. If software reset (or ...
Juraj's user avatar
  • 18k
4 votes

Reset an Arduino Uno in code

In case you have the original Arduino bootloader which you want to execute as a part of the reset, you can do a SW reset by jumping to the bootloader reset address (0x7800 on ATmega328p boards) void ...
Dmitry Grigoryev's user avatar
4 votes
Accepted

Auto Reset during programming Arduino

A Reset is necessary to activate the Bootloader and allow programming. Without the DTR signal the Reset button has to be pressed just before starting the upload from the Arduino IDE.
Mikael Patel's user avatar
  • 7,969
4 votes

Why does the Leonardo take 8 seconds to restart?

That's the firmware waiting for a programming connection. If you want alternate behavior them burn SparkFun's ATmega32U4 firmware to it. One press of Reset will reset the device, and two presses will ...
Ignacio Vazquez-Abrams's user avatar
4 votes

Reset Arduino Uno R3

Every time you rewrite an Arduino, the previous code is completely wiped out (except for the bootloader, which doesn't change). You will not fill up your arduino -- it is not like a filesystem where ...
jose can u c's user avatar
  • 6,974
4 votes

Arduino Resetting in Automotive Application

There is no power spike or loss to the PCB. The car is not actually running, I am just turning the key on and off. And did you verify that with a digital scope? I doubt it. I don't think you ...
Rudy's user avatar
  • 993
4 votes

Store value in EEPROM to perform different actions on reset?

While it looks interesting as idea, IHMO you have keep in mind: Include some code for button denouncing logic. Actually you will receive couple of “resets” during ~20ms during button press. Without ...
Serge Ageyev's user avatar
4 votes
Accepted

Standalone ATmega328P stops responding when RX is connected

There are two things wrong with the circuit in that demo. There is no decoupling capacitor on the power pins. This is required to keep the power stable during opertaion. More critically: this is ...
Majenko's user avatar
  • 105k
4 votes
Accepted

Accessing funcition in object via `->` is crashing (resetting) Arduino

Derived derivedObj; is a local variable. It's deleted when the function exits. You have saved a pointer to it, but with that object now gone your pointer points to nothing of any interest - so doing ...
Majenko's user avatar
  • 105k
4 votes
Accepted

Is there a way to make the RESET pin work in the inverse?

My personal preference would be to attach a NOT gate to the RESET pin. This can be constructed very simply from a single NPN transistor (or N-channel MOSFET) and a resistor. simulate this circuit &...
Majenko's user avatar
  • 105k
4 votes
Accepted

How do I escape a boot loop?

Start holding the reset button. This is to prevent the Arduino from entering the boot loop. Unplug the Arduino and plug it back in. Open a new sketch. Remove all of the code and replace it with int ...
glibg10b's user avatar
  • 317
3 votes
Accepted

How do I sense that the serial monitor is started?

You can't. There is no way of detecting if the serial monitor is open or not. However, you can disable the automatic reset and provide some functionality in your code for saving data to EEPROM when ...
Majenko's user avatar
  • 105k
3 votes

Pressing reset button restarts program only seconds latter

The first thing that happens when you apply power to a board or press reset, is the bootloader executes. That waits for a short time to accept a new sketch over the serial port. If nothing arrives it ...
Majenko's user avatar
  • 105k
3 votes

WDT & Software RESET in ESP8266 + Arduino IDE

Software reset in ESP8266 is achieved using ESP.reset() as per WDT, the other answer has info on that, i.e. software WDT is cleared using yield() - hardware WDT is not accessible through software
Jaromanda X's user avatar
3 votes
Accepted

Arduino(s) not resetting on Serial connection lost / re-established - why?

What you have done is to disable the "HUPCL" signal that is sent when the port is opened/closed. You can turn the signal back on with: $ stty -F /dev/ttyACM3 hupcl And you can turn it off again ...
Majenko's user avatar
  • 105k
3 votes

Arduino Pro Micro bricked?

Problem solved! By taping twice the reset and holding it the second time I managed to program my board and now the arduino ide detectes it and it works as expected. Taping and releasing the button ...
George Sp's user avatar
  • 153
3 votes

nodemcu GPIO6 clock

No. There is no way you can use it (or not without a lot of messing around...). According to the ESP8266 GPIO Reference Guide: GPIO6 to GPIO11 are usually connected to the flash chip in ESP8266 ...
Majenko's user avatar
  • 105k
3 votes
Accepted

Arduino Nano randomly resetting

Thank you all for your contributions. I managed to find the issue and solve the intermittent reset. I was expecting to find a hardware problem as the root cause, but just in case it was software ...
Jay's user avatar
  • 61
3 votes
Accepted

How to difference hardware reset and software reset?

You can't. There is no "software" reset. When you upload new code a hardware reset is triggered by the DTR pin of the USB interface chip. Instead I would suggest maintaining a "data ...
Majenko's user avatar
  • 105k
2 votes
Accepted

How do I reset an ESP8266 with an FTDI and no reset button?

Pull the reset pin up by connecting it to 3.3v with a 10k ohm resistor, then to reset the ESP you temporarily ground the pin, bringing it down to 0v/GND. I'd recommend putting in a button for that :)
bluemind's user avatar
  • 306
2 votes

Watchdog timer stuck in restart loop? (green led flashing)

Enabling watchdog timer system restart and waiting in a loop until reset is a legitimate way of SW resetting the µC as is using watchdog for catching µC's misbehavior which can be caused by various ...
Chupo_cro's user avatar
  • 510
2 votes
Accepted

Float to integer conversion for control program crashes arduino

I actually solved this issue and noticed a few things for those interested: the printNumI() function was making the arduino crash as it was badly initiated with an extra argument. Once I solved this ...
Eliott W's user avatar
  • 131
2 votes

How to Factory reset ESP8266?

AT commands are executed by the AT interpreter firmware. If you've been attempting to flash other firmware to the ESP8266 module, there is no longer any code in it that interprets AT commands. If you ...
JRobert's user avatar
  • 15.3k
2 votes

Run different code on different type of reset in arduino nano

The MCUSR register (page 79 of the datasheet) tells you what kind of reset happened most recently. As long as the USB interface chip on your nano isn't controlling the RESET pin without the port being ...
Majenko's user avatar
  • 105k

Only top scored, non community-wiki answers of a minimum length are eligible