After testing it for 30 minutes or so today it started to trigger the photo preview sequence even though the button had not been pressed. To test if this was being caused by the button I simply removed it; it still triggered on it's own.
I removed everything from the Pi and now have it connected to the monitor, keyboard, and mouse. I have run the script below to see if I can rule out any mistake made in my photobooth script.
Code: Select all
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP)
while True:
input_state = GPIO.input(23)
if input_state == False:
print('Button Pressed')
time.sleep(0.2)Does anyone perhaps know what could be causing this?