Boot on button press
-
I have a raspberry pi 0, that auto-boots to pacman, and will shutdown with 1 button press.
It is always plugged in, but stays shut down, until I unplug, and plug it back in.Is it possible to make it so that when I press a certain button (or any button) it will start booting up?
My plan is to have it so that I can just press the coin button or something, and it boots up into pacman, and then I can play immediately, and dont need access to the wires.
Thanks in advance -Fred
-
@Fredthedoggy You need a GPIO connected button to wake up the PI -
-
@mitu I mean and of the buttons on the control panel (Like coin)
-
@Fredthedoggy said in Boot on button press:
@mitu I mean and of the buttons on the control panel (Like coin)
The answer is the same - to wake up the PI (without any additional hardware like ControlBlock/ATXPi/etc.) you'd need to short 2 specific GPIO PINs and somehow this needs to be connected to a button. The PI is not a regular computer with an on/off switch - you need to add this yourself.
-
Another way is a remote-controlled power socket. I'm using one to power on and off the Pi 3b in my upright arcade cabinet. Not so elegant than a GPIO solution, but the Pi is really powered off this way.
One thing to keep in mind is to wait for the Pi to be shut down completely before switching it off to avoid data loss. My cab has illuminated buttons connected to one of the Pi's usb sockets. When they go off, I know that I can cut the power. :)
-
-
@Fredthedoggy Yes... take a look to this script here ....
You can use--generic
parameter for one button. But you need to install raspi-gpio withsudo apt install raspi-gpio
before.Shematics for wiring can be taken from here
https://scribles.net/adding-power-switch-on-raspberry-pi/ -
So it is impossible to program it to only shutdown, but not boot? Because I have it setup so it boots into on game, then another, and then shuts down and I don't want to accedently turn it off
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.