From: https://blog.petrockblock.com/powerblock-raspberry-pi-power-switch/