apt-get: command not found September 07, 2017 02:51AM |
Registered: 7 years ago Posts: 10 |
Re: apt-get: command not found September 09, 2017 01:48PM |
Admin Registered: 13 years ago Posts: 4,680 |
Re: apt-get: command not found September 11, 2017 01:24AM |
Registered: 7 years ago Posts: 10 |
Re: apt-get: command not found September 11, 2017 07:58AM |
Registered: 7 years ago Posts: 10 |
Quote
How to set it up
1. Remove your TF card and connect it to your PC or laptop with TF card adapter.
2. Modify /boot/config.txt file as following, for example, my pi is Raspberry Pi 3 model B:
device_tree=bcm2710-rpi-3-b.dtb dtoverlay=power-off,gpiopin=26 dtoverlay=pi3-act-led,gpio=21
3. Install the library of wiringPi and Download shell script to check the GPIO pin's status:
sudo apt-get install -y wiringPi cd ~ git clone https://github.com/yoyojacky/powerbutton.git cd ~/powerbutton sudo mv ~/powerbutton/gpioshutdown /etc/init.d/ sudo chmod +x /etc/init.d/gpioshutdown
4. Edit the initialized file in /etc/rc.local :
sudo nano /etc/rc.local
Add those three lines before exit 0
sudo /etc/init.d/gpioshutdown & #Thanks for Steven Porter's kindly advise. (update the "&" mark at the end of command) gpio mode 25 out gpio write 25 1
After edit this file, Press "Ctrl + X" to save this file and Press "Y“ to save it.
5. Reboot your Raspberry Pi and plug power button on your RPi, press the button to test.
Re: apt-get: command not found September 13, 2017 08:05AM |
Admin Registered: 13 years ago Posts: 4,680 |