stm32-fmt-code/access_control_python/main.py

22 lines
598 B
Python
Raw Normal View History

2023-09-17 08:27:41 +00:00
from access_control import access_control
2023-09-17 10:40:31 +00:00
from line_notify import LineNotify
2023-09-17 08:27:41 +00:00
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-23 03:31:19 +00:00
stm32.lock_door()
2023-09-23 06:03:15 +00:00
#stm32.unlock_door()
time.sleep(1)
2023-09-23 03:31:19 +00:00
#door_state = False
#while True:
#print(stm32._in_payloads)
#if(door_state != stm32.get_door_state()):
# door_state = stm32.get_door_state()
# notify = LineNotify("olK1QXriiuKgfxB6xkj7SIFfj9jsXfpl2PqmjCDuBRw")
# notify.send(f'door is {door_state}')
#if(stm32.get_door_state() == True):
# stm32.lock_door()
#else:
# stm32.unlock_door()
#time.sleep(0.01)