Switch Rpi on and off
|
29th Oct, 2014, 09:18 AM
Post: #1
|
|||
|
|||
Switch Rpi on and off
Hello,
I built a portable xbian system with a Raspberry Pi and 2 screens for in the car. The system is powered by the 12V cigarette lighter socket with a step-down converter to 5V. In the first version the Rpi was shut down very brutely because the 12V is killed when the car is turned off. In the second version I put in a small (2200 mAh) powerbank, input is connected to power from the car via the converter, the output powers the Rpi and a USB hub. In that way when the car is powered down, only the screens will turn off, the Rpi can run a few hours on battery power. I can then perform a sudo shutdown -h now. Now for the question; how can I make a button which switches the Rpi off gracefully? I read somewhere you can connect a button to a gpio pin and GND and when button is pressed a script will perform this command. I can't find it anywhere. And is there a way to switch it back on?? Any help is welcome! |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Switch Rpi on and off - vinz3nt - 29th Oct, 2014 09:18 AM
RE: Switch Rpi on and off - f1vefour - 29th Oct, 2014, 01:25 PM
RE: Switch Rpi on and off - Smultie - 29th Oct, 2014, 03:46 PM
RE: Switch Rpi on and off - f1vefour - 29th Oct, 2014, 04:54 PM
RE: Switch Rpi on and off - Smultie - 29th Oct, 2014, 05:30 PM
RE: Switch Rpi on and off - f1vefour - 29th Oct, 2014, 09:39 PM
RE: Switch Rpi on and off - Skywatch - 30th Oct, 2014, 08:18 PM
|