stm32-fmt-code/access_control_python/main.py

11 lines
229 B
Python

from access_control import access_control
import time
stm32 = access_control("COM12")
time.sleep(1)
while True:
if(stm32.get_door_state() == True):
print("Door is Closed")
else:
print("Door is Openned")