stm32-fmt-code/access_control_python/main.py

11 lines
229 B
Python
Raw Normal View History

2023-09-17 08:27:41 +00:00
from access_control import access_control
import time
2023-09-17 09:57:40 +00:00
stm32 = access_control("COM12")
2023-09-17 09:18:33 +00:00
time.sleep(1)
2023-09-17 08:27:41 +00:00
while True:
2023-09-17 09:57:40 +00:00
if(stm32.get_door_state() == True):
print("Door is Closed")
else:
print("Door is Openned")