fixed GPIO22 sensing

pull/120/head
alanbjohnston 5 years ago committed by GitHub
parent 54d79f9026
commit 1837ecb168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,14 +9,14 @@ from picamera import PiCamera
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP)
transmit = False
if GPIO.input(12) == False:
transmit = True
if GPIO.input(27) == False:
if GPIO.input(22) == False:
transmit = True
txLed = 22
txLed = 27
txLedOn = False
txLedOff = True
else:
@ -25,7 +25,7 @@ else:
txLedOff = False
GPIO.setup(txLed, GPIO.OUT)
print(txLed)
print(txLedOn)
print(transmit)

Loading…
Cancel
Save

Powered by TurnKey Linux.