25 lines
375 B
Python
25 lines
375 B
Python
#!/usr/bin/env python
|
|
#coding=utf-8
|
|
|
|
import signal
|
|
import sys
|
|
import os
|
|
import time
|
|
import RPi.GPIO as GPIO
|
|
|
|
############################################
|
|
############## END OF IMPORTS ##############
|
|
|
|
# GPIO for Buttons
|
|
pin_start = 36
|
|
|
|
|
|
# initialise gpio
|
|
GPIO.setmode(GPIO.BOARD)
|
|
GPIO.setup(pin_start, GPIO.IN)
|
|
|
|
while True:
|
|
print(GPIO.input(pin_start))
|
|
time.sleep(1)
|
|
|