fmt-rtos
This commit is contained in:
parent
b011033330
commit
6c44c742e8
114 changed files with 17837 additions and 4209 deletions
|
@ -4,15 +4,16 @@ import time
|
|||
|
||||
stm32 = access_control("COM12")
|
||||
time.sleep(1)
|
||||
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)
|
||||
stm32.lock_door()
|
||||
#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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue