From 5e019fef2063c0cc71ed8b7d33c475a4da46d07b Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Mon, 6 Nov 2023 13:53:10 +0700 Subject: [PATCH] display initial code --- access_control_python/access_control_mqtt.py | 23 ++++++++++++++++++++ access_control_python/display.py | 3 +++ access_control_python/espmega_mqtt.py | 7 ++++++ access_control_python/requirements.txt | 4 +++- 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 access_control_python/access_control_mqtt.py create mode 100644 access_control_python/display.py create mode 100644 access_control_python/espmega_mqtt.py diff --git a/access_control_python/access_control_mqtt.py b/access_control_python/access_control_mqtt.py new file mode 100644 index 0000000..43b95b9 --- /dev/null +++ b/access_control_python/access_control_mqtt.py @@ -0,0 +1,23 @@ +import paho.mqtt.client as mqtt + +BASE_TOPIC = "/facescan" + +class access_control: + def __init__(self, serial_port: str): + pass + + def light_on(self): + pass + def light_off(self): + pass + def get_door_state(self) -> bool: + pass + + def get_scan_state(self) -> bool: + pass + + def lock_door(self): + pass + + def unlock_door(self): + pass diff --git a/access_control_python/display.py b/access_control_python/display.py new file mode 100644 index 0000000..7f9d35c --- /dev/null +++ b/access_control_python/display.py @@ -0,0 +1,3 @@ +class Display: + def __init__(self) -> None: + pass \ No newline at end of file diff --git a/access_control_python/espmega_mqtt.py b/access_control_python/espmega_mqtt.py new file mode 100644 index 0000000..ff9cbff --- /dev/null +++ b/access_control_python/espmega_mqtt.py @@ -0,0 +1,7 @@ +class espmega_mqtt: + def __init__(self) -> None: + pass + def write_pwm(): + pass + def read_digital(): + pass \ No newline at end of file diff --git a/access_control_python/requirements.txt b/access_control_python/requirements.txt index cc09e72..7b0e956 100644 --- a/access_control_python/requirements.txt +++ b/access_control_python/requirements.txt @@ -1,4 +1,6 @@ pyserial line_notify opencv-python -requests \ No newline at end of file +requests +mysql-connector-python +paho-mqtt \ No newline at end of file