How nix-ui/practica_2_iot works
Project Type and Purpose
• This project is an IoT application designed to control LEDs and capture sensor data, using ESP32 boards for both LED management (esp_leds) and sensor data capture (esp_sensor).
Main Components
• Hardware Modules:
• ESP32 for LED control (contained in the esp_leds folder) with supporting classes: Led, LedController, LedExecute, and a ServerClient communication module.
• ESP32 for sensor measurement (contained in the esp_sensor folder) which uses classes like UltraSonicSensor and SensorExecute, as well as its own ServerClient module.
• Communication/Networking:
• A common ServerClient component used by both ESP software components.
• The server (server.py) which acts as the central orchestrator to receive sensor readings, update LED states, and manage the protocol commands (GET, POST, UPDATE).
• Additional Supporting Items:
Methodology to Represent the System
• Shared modules (ServerClient) as connecting sub-components within both nodes.
b. Establish the Relationships and Data Flow:
c. Internal architectural abstractions:
d. Mention the Key Technologies and Protocols:
• That the server.py (likely running on a standard server platform) manages connections through a WiFi network.
Architectural Pattern and Design Principles
• This project demonstrates a modular microcontroller-based design where each ESP32 unit encapsulates its own functions (actuator or sensor) while sharing a common communication protocol.
• The separation between the IoT edge nodes and the central server emphasizes decoupled design and real-time communication.
• The use of classes and defined protocols indicates adherence to principles of modularity and layered architecture.
Practical Steps
• Communication methods (ServerClient usage) and indicate the WiFi network as the medium for the data flow.