problem is the button press isnt being recognized by the python script.
'sudo python xxxx.py' hangs terminal. heres a test script:
Code: Select all
import RPi.GPIO as GPIO
import time
import os
GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.IN)
while True:
if GPIO.input(23):
os.system("sudo shutdown -h now")
prev_input = input
time.sleep(0.05)