How airowl-iot/airowl works
Project type and purpose
• This is an embedded IoT product (“Airowl”) for indoor air-quality measurement.
• It combines hardware (3D-printed case, PCB, M5Stack Core S3 SE board, Sensirion SEN54 sensor), embedded firmware (built with PlatformIO/CMake), a touchscreen UI (LVGL + SquareLine), Matter protocol integration, and design/source files (PCB, 3D prints).
File structure
• Top‐level directories:
• Designfiles (3D case & facia)
• Mountingboard (KiCad PCB project)
• Firmware (PlatformIO project + libraries)
• squareline (UI designer assets)
• src (main firmware code + UI code)
• Firmware/lib contains sub‐libs: Arduino_GFX (display control), Matter (Matter stack), TFT_eSPI, TouchLib, lvgl (GUI), etc.
• The src folder holds main.cpp, sensor interface, LVGL setup, Matter wrapper, and UI screen modules.
README for insights
• The device uses ESP32-S3 (Wi-Fi + Matter).
• Displays air quality graphs for PM1, PM2.5, PM4, TVOC, etc.
• Matter compatibility enables integration with Apple HomeKit, Google Home.
• SquareLine Studio generates the lvgl UI components under src/ui.
Main components & interactions
a. Hardware components (physical layer)
• Sensirion SEN54 air-quality sensor (I²C)
• M5Stack Core S3 SE module (ESP32-S3 MCU, Wi-Fi/BT, AXP2101 PMIC)
• 320×240 capacitive touch LCD
• Speaker, power management
• 3D printed case & front facia
b. Firmware components (embedded software layer)
• PlatformIO/CMake build system
• Board initialization & power management (AXP2101 driver)
• Sensor driver (Sensor.h/time_func.h → read air-quality data)
• UI framework:
• lvgl core + SquareLine-generated screens
• Arduino_GFX/TFT_eSPI for low-level display bus
• TouchLib for capacitive touch input
• Matter stack:
• Matter.cpp/H wrapper → advertises device to Matter network
• Endpoint definitions for sensors/lights if any
• Application logic: data acquisition, UI update, Matter reporting
c. External services
• Matter network over Wi-Fi
• Home ecosystems: Apple HomeKit, Google Home
Architectural patterns & design principles
• Layered architecture:
• HAL layer (GPIO, I²C, TFT bus, touch bus)
• Middleware (Arduino_GFX, TFT_eSPI, TouchLib, lvgl, Matter)
• Application layer (main.cpp, sensor reading, UI screens, Matter wrapper)
• Separation of concerns:
• UI generation isolated under src/ui (SquareLine)
• Networking/Matter integration isolated in Matter lib
• Sensor logic in Sensor.h / time_func.h
Elements
• Clear labels for each component (e.g., “ESP32-S3 MCU”, “Sensirion SEN54 (I²C)”)
• Sensor → MCU → UI → display
• MCU → Matter stack → Wi-Fi → Cloud/Home
• Rounded rectangles for hardware
• Stacked blocks for firmware modules
• Attach “I²C → SEN54 sensor”
• Attach “SPI/QSPI → 320×240 LCD” and “Touch interface → touch controller”
• Speaker output, power supply chain
• HAL: I²C driver, SPI/TFT driver, touch driver, PMIC driver
• Middleware: Arduino_GFX/TFT_eSPI, TouchLib, lvgl, Matter
• Application: main.cpp, Sensor module, UI screens, Matter wrapper
d. Interactions:
• Sensor readings flow upwards into application logic
• Application pushes data to UI and to Matter reporting
• UI events (touch) flow down into lvgl middleware, then to application event handlers