DEV Community

Discussion on: Build a safe way to shutdown a headless raspberry pi with a tiny button.

Collapse
 
brucerinehart profile image
Bruce Rinehart

this is a great tutorial! It was latenight and I wasn't going to be able to get the supplies, mainly the button! Since my headless project wasn't dependent on the USB ports, I used lsusb in python to detect (changes) in the number of devices plugged in to trigger a shutdown script. I'm new here, so will post the code once I have a moment. Once the buttons arrive in the mail, gonna give this a try. So grateful to this example to get me in the pattern! Thanks!