This commit is contained in:
2018-12-11 00:08:06 +08:00
parent c40428caa1
commit d4073058fc

22
app.py Normal file
View File

@ -0,0 +1,22 @@
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()