-1

I'm developing a reset switch for the Raspberry Pi, but I want to prevent that holding the button keeps on resetting the device. To solve this I had the following idea:

Wire a push button from the Raspberry Pi power to a GPIO pin. Whenever the button is pushed, that pin becomes high. Then, with Python, this is detected and another GPIO pin is pushed high. This pin is connected to the reset, ergo the device resets.

But because the device resets itself after an input, it automatically unresets, because of the fact the device resets. When it resets, it cannot put the pin to high and thus cannot reset itself.

So, a single press reset button for the Raspi in which it isn't a problem if you hold it a little longer.

Is my logic on how this works correct?

Len
  • 107
  • 1
  • 2

1 Answers1

0

This may still not be exactly what you want, but the following script is what I use to Power my Pi off (not my own code, although I adapted it so you need to hold the button for 1 sec to poweroff), but you could adapt the script too reboot if this is what you want.

I use the RUN pin to reboot (all my Pi have a button soldered to the RUN pads).

Milliways
  • 62,573
  • 32
  • 113
  • 225