22 lines
354 B
Python
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() |