Introduction: Use a Button to Execute Commands on a Raspberry Pi
I am sharing the project i did for the 2016 fll competition with the hackground team where i made a mouse trap that detected when a mouse entered and sent you an email.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Lets Go!
the first thing you need to do is download andrewH7's python code which will be perfect for what we are doing
once you download this to your raspberry pi you must edit the code so it works
and once you do that you can change os.system("sudo shutdown -h now")
to any command you want within the parenthesis
now you are finished all you need to do now is run the script and connect pin 21 on the gpio to ground
1 Person Made This Project!
- GuidoMonstrey made it!