How froods/isous works
1. Repository shape
- This is a two-part system: a Python GUI in GUI/ and embedded firmware in embedded/.
- The architecture is not a pure software service; it is a host application + microcontroller firmware setup with a hardware control loop on the embedded side.
2. Top-level responsibility split
- The GUI is the operator-facing client: it starts the app, renders pages, and sends/receives control data.
- The embedded firmware owns the real-time hardware side: sensor reading, actuator control, and local orchestration logic.
3. GUI subsystem
- GUI/main.py is the entry point.
- GUI/pages.py likely defines the screen/page structure of the interface.
- GUI/client.py is the communication layer between the GUI and the embedded controller.
- The GUI depends on Python packages from requirements.txt, and the README shows it is run with a local Python environment.
4. Embedded application entry and orchestration
- embedded/src/main.cpp is the firmware entry point.
- embedded/src/ISOUScontroller.cpp and embedded/include/ISOUScontroller.h appear to be the central orchestration layer, coordinating sensors, settings, and actuators.
- This suggests a controller pattern where ISOUScontroller is the main application object rather than logic being spread across main.cpp.
5. Hardware abstraction layer
- embedded/src/I2C.cpp plus embedded/include/I2C.h provide low-level bus access used by multiple peripherals.
- embedded/src/UARTinterface.cpp plus embedded/include/UARTinterface.h provide the communication channel, likely used to talk to the Python GUI.
- These are the key boundaries between application logic and hardware/protocol details.
6. Sensors
- SCD30 is a CO2 sensor driver.
- TSL2561 is a light sensor driver.
- lm75 is a temperature sensor driver.
- These drivers likely feed the controller with environmental measurements used for automation and display in the GUI.
7. Actuators / physical outputs
- curtain_driver and window_driver indicate the firmware can physically move curtains and windows.
- That means the embedded side is not only monitoring; it also performs actuation based on sensor values and settings.
- In the architecture diagram, these are downstream outputs from the controller.
8. Settings and domain model
- UserSettings and CO2Setting show a dedicated settings layer separate from raw hardware drivers.
- This layer likely stores thresholds, modes, or user preferences that influence controller behavior.
- It is the main bridge between operator intent from the GUI and embedded control decisions.
9. End-to-end data flow
- Sensor data comes from the hardware drivers into ISOUScontroller.
- The controller evaluates settings and current readings, then drives windows/curtains as needed.
- The GUI communicates with the embedded firmware through client.py / UARTinterface, likely to show status and change settings.
- So the main loop is: hardware → embedded controller → communication layer → GUI, with commands flowing back in the opposite direction.
10. Build/runtime boundaries
- The embedded side is a PlatformIO project (embedded/platformio.ini), which strongly suggests a microcontroller build and flash workflow.
- The GUI side is a separate Python runtime with its own dependency management and startup path.
- These are independent deployment targets, so the diagram should show them as two runtimes connected by a serial/UART link.
11. Operational artifacts
- isous.log implies the system produces logs, likely from the GUI or integration runs.
- setup.sh suggests there is a convenience bootstrap script for the development environment.
12. Most important architectural takeaway
- The repo centers on a closed-loop environmental control system: the embedded controller reads physical sensors, decides on actions, and controls actuators, while the Python GUI acts as the human interface for monitoring and configuration.
Main entry points: ISOUScontroller.cpp Controller · I2C.cpp I2C bus · main.py Main app · README.md README
Components 17
Python GUI
Operator-facing desktop client runtime
- Main app · Starts the GUI runtime and application flow
GUI/main.py - Pages · Defines the page and screen structure of the interface
GUI/pages.py - Client · Handles communication between the GUI and the embedded controller
GUI/client.py - Python deps · Python package requirements for the GUI runtime
requirements.txt
Embedded firmware
Microcontroller control runtime
- Firmware main · Microcontroller entry point and startup wiring
embedded/src/main.cpp - Controller · Central orchestration layer for readings, settings, and actuation
embedded/src/ISOUScontroller.cpp - Settings · User and CO2 settings that guide controller behavior
embedded/src/UserSettings.cpp - PlatformIO · Embedded build and flash environment
embedded/platformio.ini
Hardware access
Low-level bus and protocol boundaries
- UART interface · Serial communication boundary used to exchange data with the GUI
embedded/src/UARTinterface.cpp - I2C bus · Low-level I2C access shared by sensor peripherals
embedded/src/I2C.cpp
Devices
Sensors and actuators on the embedded side
- SCD30 · CO2 sensing driver
embedded/src/SCD30.cpp - TSL2561 · Ambient light sensing driver
embedded/src/TSL2561.cpp - lm75 · Temperature sensing driver
embedded/src/lm75.cpp - Curtain driver · Controls curtain movement as a physical output
embedded/src/curtain_driver.cpp - Window driver · Controls window movement as a physical output
embedded/src/window_driver.cpp
Other components
- README · Top-level project overview and usage notes
README.md - Setup script · Convenience script for local development setup
setup.sh
Connections 17
- Main app → Pages: renders · Main app loads the page structure for the interface
- Main app → Client: uses · Main app delegates device communication to the client layer
- Main app → Python deps: depends on · GUI runtime relies on installed Python dependencies
- Client → UART interface: serial link · Client exchanges control and status data with firmware over UART
- Firmware main → Controller: boots · Firmware entry point initializes the central controller
- Controller → Settings: reads · Controller uses user and threshold settings for decisions
- Controller → I2C bus: accesses · Controller reaches sensors through the shared I2C boundary
- Controller → UART interface: publishes · Controller exposes status and accepts remote commands via UART
- I2C bus → SCD30: drives · I2C bus supports the CO2 sensor driver
- I2C bus → TSL2561: drives · I2C bus supports the light sensor driver
- I2C bus → lm75: drives · I2C bus supports the temperature sensor driver
- Controller → Curtain driver: controls · Controller commands curtain actuation
- Controller → Window driver: controls · Controller commands window actuation
- PlatformIO → Firmware main: builds · PlatformIO builds the embedded firmware
- README → Main app: documents · Project docs describe the GUI runtime
- README → Controller: documents · Project docs describe the embedded control loop
- Setup script → Python deps: installs · Setup bootstrap likely prepares the Python environment