Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import RPi.GPIO as GPIO
- import time
- GPIO.setmode(GPIO.BCM)
- GPIO.setwarnings(False)
- lock = 4
- GPIO.setup(lock, GPIO.OUT)
- while True:
- GPIO.output(lock, 1)
- time.sleep(5)
- GPIO.output(lock, 0)
- time.sleep(5)
- GPIO.cleanup()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement