Skip to content

Instantly share code, notes, and snippets.

René Schimmelpfennig MCeddy

View GitHub Profile
@MCeddy
MCeddy / shutdown.py
Last active Sep 1, 2017
raspberry pi 3 shudown button
View shutdown.py
import RPi.GPIO as GPIO
import os
BUTTON_PIN = 14
GPIO.setmode(GPIO.BCM)
GPIO.setup(BUTTON_PIN, GPIO.IN)
try:
channel = GPIO.wait_for_edge(BUTTON_PIN, GPIO.RISING)
You can’t perform that action at this time.