Finished
This commit is contained in:
22
app.py
Normal file
22
app.py
Normal 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()
|
Reference in New Issue
Block a user