def opening(dc4): if dc4 == '1': opendoor() elif dc4 == '2': print('warning') elif dc4 == '0': print('warning: None Human')
def opening(dc4): if dc4 == '1': unlocking() opendoor() f=open("cin.txt", 'w') f.write("in") f.close elif dc4 == '2': print('warning') elif dc4 == '0': print('warning: hacking Error')
###################################################### try: while True: if GPIO.input(pir_s) == True: print('Sensor On!!') k2 = checkin() GPIO.output(LED, True) if k2 == 'in': print('in ---------> off') closedoor() time.sleep(5) checkoff() elif k2 == 'off': print('off ---------> in') opendoor() checkon() else: k2 = checkin() if k2 == 'in': print('also:in --------> off') closedoor() time.sleep(5) checkoff() GPIO.output(LED, False) except KeyboardInterrupt: GPIO.cleanup()
def opening(dc4): if dc4 == '1': opendoor() elif dc4 == '0': print('warning')
def matchacces(): matchF = request.args.get('match', '0') print(matchF) opendoor() return matchF