import RPi.GPIO as gpio
import time as zeit

def init():
    t1 = 20
    t2 = 16
    pause = 0.1
    gpio.setwarnings(False)
    gpio.cleanup()
    gpio.setmode(gpio.BCM)
    gpio.setup(t1, gpio.IN)
    gpio.setup(t2, gpio.IN)
    return (t1, t2, pause)

def main():
    (t1, t2, pause) = init()
    while(True):
        print gpio.input(t1), gpio.input(t2)
        zeit.sleep(pause)

main()
    
