# if using a momentary push button without a resistor. # Use built-in internal pullup resistor so the pin is not floating # LICENSE: This code is released under the MIT License () # instead of stacking the pHAT on your Pi. # You can also use any button but you would need to wire it up # Feel like supporting our work? Buy a board from SparkFun! # check out the associated tutorial to adjust your "rc.local" file: # For more information on running this script on startup, # 1.) If you press the button momentarily, the Pi will shutdown. # built-in general purpose button to safely reboot/shutdown you Pi: # This python script takes advantage of the Qwiic pHat v2.0's # Based on code from the following blog and tutorials: # Raspberry Pi Safe Shutdown Python Script Just make sure to name this file as safe_shutdown_Pi.py and remember the location that the file was saved. You can also copy the code and paste it in a text editor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |