Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
%DASHBOARD{ section="banner" | ||||||||
Line: 19 to 19 | ||||||||
| ||||||||
Changed: | ||||||||
< < | GPIO Shutdown | |||||||
> > |
Switches for Shutdown and Run | |||||||
To keep prices down, the Raspberry Pi is missing something that most electronic devices come with: a switch to turn it on and off. That’s OK, you say, we’ll just pull the plug to turn it off. Unfortunately, this can lead to corruption problems with the SD card. All the instructions say you should run the shutdown command before pulling the plug, but this is not always possible, particularly when your Raspberry Pi is running headless without a connected keyboard and monitor, and possibly even without a network connection. So, what can a self-respecting DIYer do? The answer, of course, is ‘add your own switch’!To switch off the Raspberry Pi from the console: | ||||||||
Changed: | ||||||||
< < | sudo poweroff shutdown -h now sudo halt shutdown -r now sudo reboot | |||||||
> > | pi@cosmac:~ $ sudo poweroff | |||||||
https://github.com/raspberrypi/firmware/tree/master/boot/overlays![]() | ||||||||
Line: 41 to 37 | ||||||||
| ||||||||
Changed: | ||||||||
< < | /boot/config.txt | |||||||
> > | Add following line to the file /boot/config.txt
| |||||||
dtoverlay=gpio-shutdown,gpio_pin=21 | ||||||||
Added: | ||||||||
> > | ||||||||
Run | ||||||||
Line: 54 to 51 | ||||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
Line: 69 to 68 | ||||||||
| ||||||||
Added: | ||||||||
> > |
|