This repository has been archived on 2019-10-02. You can view files and clone it, but cannot push or open issues or pull requests.
Files
DoorUnlocker/app.py
2018-12-11 00:08:06 +08:00

22 lines
354 B
Python

import time
import CHIP_IO.GPIO as GPIO
pin = "XIO-P7"
def main():
GPIO.setup(pin, GPIO.OUT)
time.sleep(0.1)
GPIO.output(pin, GPIO.LOW)
print("Unlocking...")
time.sleep(0.4)
GPIO.output(pin, GPIO.HIGH)
print("Unlocked!")
time.sleep(0.4)
GPIO.cleanup(pin)
time.sleep(0.1)
if __name__ == '__main__':
main()