2020-May Pi Switch Control Determine if switches are on (high) or off (low) 123456789101112import RPi.GPIO as GPIOGPIO.setwarnings(False) # Ignore warning for nowGPIO.setmode(GPIO.BOARD) # Use physical pin numberingGPIO.setup(10, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) # Set pin 10 to be an input pin and set initial value to be pulled low (off)print("Waiting for button push")while True: # Run forever if GPIO.input(10) == GPIO.HIGH: print("Button was pushed!") References https://raspberrypihq.com/use-a-push-button-with-raspberry-pi-gpio/ Newer Pi Servo Control Older Pi Useless Box