21 lines
376 B
Python
21 lines
376 B
Python
import RPi.GPIO as GPIO
|
|
import board
|
|
import time
|
|
import busio
|
|
from digitalio import DigitalInOut, Direction
|
|
|
|
|
|
def main():
|
|
PIN_DOOR = 6
|
|
GPIO.setmode(GPIO.BCM)
|
|
GPIO.setup(PIN_DOOR,GPIO.OUT)
|
|
GPIO.output(PIN_DOOR,False)
|
|
while True:
|
|
time.sleep(1)
|
|
GPIO.output(PIN_DOOR,True)
|
|
time.sleep(4)
|
|
GPIO.output(PIN_DOOR,False)
|
|
|
|
if __name__ == '__main__':
|
|
main()
|