Update access_control_mqtt.py

This commit is contained in:
Siwat Sirichai 2023-12-11 12:05:24 +07:00
parent 19af9f3d3c
commit 186d443793
1 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ class access_control:
""" """
Activates the LED alarm. Activates the LED alarm.
""" """
self.plc.digital_write(2,1) self.plc.digital_write(8,1)
while(True): while(True):
self.plc.digital_write(1,round((perf_counter()*2)%1)) self.plc.digital_write(1,round((perf_counter()*2)%1))
print(round((perf_counter()*2)%1)) print(round((perf_counter()*2)%1))
@ -63,6 +63,6 @@ class access_control:
if self.get_door_state(): if self.get_door_state():
self.lock_door() self.lock_door()
self.plc.digital_write(1,0) self.plc.digital_write(1,0)
self.plc.digital_write(2,0) self.plc.digital_write(8,0)
break break