How computeruncle/smart-plant-irrigation-system works
Purpose and entry points
This repository is an embedded monitoring/control project centered on an ESP32, a DHT11 temperature/humidity sensor driver, and a PCF8574-backed 1602 LCD driver. The primary firmware entry point is ESP32/MAPPESP32.ino. Supporting device abstractions are in DHT11/DHT11.h and PCF8574LCD/I2C1602.h. mapp.cpp appears to be a separate top-level C++ source unit whose integration role is not evident from the tree alone.
ESP32 application orchestration
ESP32/MAPPESP32.ino is the system composition boundary: it is expected to initialize hardware, invoke sensor/LCD components, and serve or expose application state. It owns the embedded runtime lifecycle rather than the reusable drivers.
• ESP32/MAPPESP32.ino
• DHT11/DHT11.h
• PCF8574LCD/I2C1602.h
Sensor acquisition stage
The DHT11 module encapsulates communication with the temperature/humidity sensor. Its public interface is declared separately from its implementation, enabling the ESP32 application to consume readings without embedding protocol-level logic.
• DHT11/DHT11.h
• DHT11/DHT11.cpp
The boundary is between application-level measurement handling in the ESP32 sketch and sensor-specific timing/protocol behavior inside the DHT11 driver.
Display output stage
The LCD module provides an I2C-facing abstraction for a 1602 character display using a PCF8574 I/O expander. The ESP32 application can send formatted status or measurements through this driver rather than directly manipulating I2C LCD signals.
• PCF8574LCD/I2C1602.h
• PCF8574LCD/I2C1602.cpp
This establishes an output boundary: display transport and controller commands remain localized to the LCD component.
Browser/UI asset boundary
ESP32/data/index.html is a static web asset associated with the ESP32 firmware. Its placement under ESP32/data indicates a device-hosted or device-deployed UI payload, distinct from firmware source and hardware drivers.
• ESP32/data/index.html
• ESP32/MAPPESP32.ino
The expected flow is firmware-managed application state to a browser-facing HTML interface, although the exact transport/server implementation is not visible in the supplied tree.
Primary control and data flow
The architecture is organized around an embedded loop/lifecycle:
1. ESP32/MAPPESP32.ino initializes ESP32 runtime and connected peripherals.
2. The application requests environmental readings through the DHT11 module.
3. Measurement values are consumed by application logic.
4. The application sends status/readings to the I2C LCD module.
5. The ESP32-associated HTML asset provides a separate user-facing presentation surface.
Material runtime and infrastructure
The material runtime is ESP32/Arduino-style firmware, indicated by the .ino entry point. Hardware infrastructure includes a DHT11 sensor and an I2C LCD stack consisting of a PCF8574 expander and 1602 display. A browser is an external consumer of ESP32/data/index.html; no cloud service, database, or external API integration is evidenced by the repository tree.
Main entry points: MAPPESP32.ino Measurement handling · DHT11.h DHT11 interface · DHT11.cpp DHT11 driver · I2C1602.h I2C1602 interface
Components 12
ESP32 Firmware
Arduino-style embedded application runtime.
- MAPPESP32 · Composes runtime lifecycle, measurements, and presentation.
ESP32/MAPPESP32.ino - Measurement handling · Consumes environmental readings for status output.
ESP32/MAPPESP32.ino
Device Drivers
Reusable hardware protocol abstractions.
- DHT11 interface · Public sensor-reading abstraction.
DHT11/DHT11.h - DHT11 driver · Implements DHT11 timing and communication.
DHT11/DHT11.cpp - I2C1602 interface · Public character-display abstraction.
PCF8574LCD/I2C1602.h - PCF8574 LCD driver · Implements expander and LCD controller commands.
PCF8574LCD/I2C1602.cpp
Hardware
Connected monitoring and display peripherals.
- DHT11 sensor · Provides temperature and humidity values.
- PCF8574 expander · Expands I2C signals for the display.
- 1602 LCD · Shows formatted device status.
Device UI
Browser-facing static payload.
- index.html · Device-hosted or deployed browser UI payload.
ESP32/data/index.html - Browser · Presents the device UI.
Other components
- mapp.cpp · Top-level source with no evident integration role.
mapp.cpp
Connections 10
- MAPPESP32 → Measurement handling: runs
- Measurement handling → DHT11 interface: requests readings
- DHT11 interface → DHT11 driver: declares
- DHT11 driver → DHT11 sensor: reads
- Measurement handling → I2C1602 interface: sends status
- I2C1602 interface → PCF8574 LCD driver: declares
- PCF8574 LCD driver → PCF8574 expander: uses I2C
- PCF8574 expander → 1602 LCD: drives
- MAPPESP32 → index.html: manages payload · Serving transport is not evidenced.
- index.html → Browser: presents in