diff --git a/smart_bridge/src/UI/view.py b/smart_bridge/src/UI/view.py index 32d6cd6..b3c94ae 100644 --- a/smart_bridge/src/UI/view.py +++ b/smart_bridge/src/UI/view.py @@ -18,9 +18,9 @@ def create_main_window(): root = tk.Tk() root.title("Car Washing Dashboard") - root.geometry("500x500") + root.geometry("600x600") root.configure(bg='lightblue') - root.resizable(False, False) + root.resizable(True, True) return root @@ -61,7 +61,7 @@ def configure_dynamic_elements(root): (tk.Label, wash_counter, 1), (tk.Label, progress_status, 4), (tk.Label, current_temperature, 5), - (tk.Label, message, 6) + (tk.Label, ui_message, 6) ] for element_type, text_var, row in dynamic_elements: diff --git a/smart_bridge/src/components/api/Temp.h b/smart_bridge/src/components/api/Temp.h new file mode 100644 index 0000000..7b7f869 --- /dev/null +++ b/smart_bridge/src/components/api/Temp.h @@ -0,0 +1,29 @@ +#ifndef __TEMP__ +#define __TEMP__ + +/** + * @class Temp + * @brief This class represents a temperature sensor. + * + * It provides functionalities to get the temperature. + */ +class Temp +{ + +public: + /** + * @brief Construct a new Temp object + * + * @param pin The pin number where the temperature sensor is connected. + */ + Temp(int pin); + +private: + /** + * @brief The pin number where the temperature sensor is connected. + * + */ + int tempPin; +}; + +#endif // __TEMP__ diff --git a/smart_bridge/src/components/impl/Temp.cpp b/smart_bridge/src/components/impl/Temp.cpp new file mode 100644 index 0000000..4b0e17f --- /dev/null +++ b/smart_bridge/src/components/impl/Temp.cpp @@ -0,0 +1,9 @@ +#include "../api/Temp.h" +#include "config/config.h" +#include "Arduino.h" + +Temp::Temp(int pin) +{ + this->tempPin = TMP_PIN; + pinMode(tempPin, INPUT); +} \ No newline at end of file