- If Flask Service is installed, Start Flask Service.
- Wait 60 seconds and start Cold Boot / Force Shutdown Assistant.
- If Flask Service is installed, everyone can see current count.
- Download Raspbian Lite from Here.
- Unzip downloaded file.
- Write image to Micro SD Card.
sudo raspi-config
- Choose 2 Network Options
- Choose N2 Wi-fi
- Select Country
- Enter WiFi SSID
- Enter WiFi Password
- Enable SSH Server from raspi-config
- Choose 5 Interfacing Options
- Choose P2 SSH
- Select <Yes>
- Edit sshd_config
sudo raspi-config
- Uncomment these lines
#Port 22 #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress :: #LoginGraceTime 2m #PermitRootLogin prohibit-password #PasswordAuthentication yes #PermitEmptyPasswords no
- Ctrl + O
- Enter
- Ctrl + X
- Make sure SSH Service is enabled and reload SSH Service
sudo service ssh enable
sudo service ssh restart
sudo service ssh status
- Install git
sudo apt-get update
sudo apt-get install -y git
- Clone this repository
git clone https://github.com/eavictor/ColdBootAssistant.git
- Change Directory
cd ColdBootAssistant
- Change file owner (4 files)
chown +x install1_python.sh
chown +x install2_coldboot.sh
chown +x install2_force_shutdown.sh
chown +x install3_flask.sh
- Install Python 3.7.3 (1st script)
sudo bash install1_python.sh
- Change user to root
sudo -i
- Install one of below service (2nd script)
bash install2_coldboot.sh
bash install2_force_shutdown.sh
- Install Flask for showing cycle count (optional, 3rd script)
bash install3_flask.sh
- For Force Shutdown, install python 3.7.3 and dependencies and put pc_boot_complete.py to startup folder
- 1x Raspberry Pi 3 Model B
- 1x Sharp PC817 (OPTO Isolator)
- 1x Keyes Relay
- 1x 1/4W 10kΩ Resistor
- 1x 1/4W 1kΩ Resistor
- 1x Breadboard
- 3x Female-to-Female DuPont Wire (see below)
- 8x Male-to-Female DuPont Wire (see below)
- 1x MicroSD Card
Important
Female-to-Female DuPont Wire
1x red (RPi PIN 2 <--> Relay VCC PIN)
1x black (RPi PIN 6 <--> Relay GND PIN)
1x white (RPi PIN 12 <--> Relay IN1 PIN)
Important
Male-to-Female DuPont Wire
1x red (PC817 PIN 4 <--> RPi PIN 1)
2x black (Breadboard - <--> RPi PIN 9)
1x blue (PC817 PIN 3 <--> RPi PIN 3 <--> 1kΩ Resistor <--> Breadboard-)
1x green (PC PowerLED+ <--> PC817 PIN 1)
1x yellow (PC PowerLED- <--> PC817 PIN 2 10kΩ Resistor <--> Breadboard-)
1x orange (Relay PIN 1 <--> PowerSW+)
1x purple (Relay PIN 3 <--> PowerSW-)