import RPi.GPIO as GPIO GPIO.setup(37, GPIO.IN) ok = True while ok : if GPIO.input(37) == 1: print("37 = 1") ok = false