init stuff
This commit is contained in:
parent
9db92276be
commit
c01556ac9f
@ -1,8 +1,13 @@
|
|||||||
import RPi.GPIO as GPIO
|
import RPi.GPIO as GPIO
|
||||||
|
|
||||||
CHANNEL = 19
|
CHANNEL = 19
|
||||||
|
GPIO.setmode(GPIO.BOARD)
|
||||||
|
|
||||||
|
|
||||||
|
GPIO.setup(CHANNEL, GPIO.IN)
|
||||||
|
|
||||||
if GPIO.input(CHANNEL):
|
if GPIO.input(CHANNEL):
|
||||||
print('Input was HIGH')
|
print('Input was HIGH')
|
||||||
else:
|
else:
|
||||||
print('Input was LOW')
|
print('Input was LOW')
|
||||||
|
|
||||||
|
GPIO.cleanup()
|
||||||
|
Loading…
Reference in New Issue
Block a user