# fadilsnt/esp32-no-lcd-moist architecture

> Architecture diagram of the GitHub repository fadilsnt/esp32-no-lcd-moist, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fadilsnt/esp32-no-lcd-moist
- Repository: https://github.com/fadilsnt/esp32-no-lcd-moist

## Overview

This is a single-sketch ESP32 machine-monitoring firmware, not a multi-service application. Its main workflow reads temperature and electrical measurements, substitutes zero for invalid values used in the payload, and periodically sends JSON to an API when WiFi is connected. The README also documents the currently inactive moisture input and server response. The source was not excerpted, so relationships below rely on the README’s explicit descriptions and diagrams.

Main entry points: [`esp32-no-lcd-moist.ino`](https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino) (Sampling loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_firmware["ESP32 firmware"]
  node_esp32["ESP32 controller"]
  node_cycle["Sampling loop"]
  node_sanitize["Safe-value helper"]
  node_payload["JSON payload"]
end

subgraph group_sensing["Machine sensing"]
  node_thermocouple["MAX6675 sensor"]
  node_pzem["PZEM-004T sensor"]
  node_moisture["Moisture placeholder"]
end

subgraph group_delivery["Network delivery"]
  node_wifi["WiFi connection"]
  node_http["HTTP client"]
end

node_wifi_network(("WiFi network"))
node_api["IoT 7K API"]

node_esp32 -->|"runs loop"| node_cycle
node_cycle -->|"reads temperature"| node_thermocouple
node_cycle -->|"reads measurements"| node_pzem
node_cycle -->|"uses zero"| node_moisture
node_cycle -->|"sanitizes readings"| node_sanitize
node_cycle -->|"builds JSON"| node_payload
node_esp32 -->|"connects during setup"| node_wifi
node_wifi -->|"joins network"| node_wifi_network
node_cycle -->|"posts when connected"| node_http
node_http -->|"sends payload"| node_payload
node_http -->|"posts readings"| node_api
node_api -->|"returns response"| node_http

click node_esp32 "https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino"
click node_cycle "https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino"
click node_sanitize "https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino"
click node_payload "https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino"
click node_thermocouple "https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino"
click node_pzem "https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino"
click node_moisture "https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino"
click node_wifi "https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino"
click node_http "https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_esp32,node_cycle,node_sanitize,node_payload toneBlue
class node_thermocouple,node_pzem,node_moisture toneAmber
class node_wifi,node_http,node_api toneMint
class node_wifi_network toneIndigo
```

## Components

### ESP32 firmware

- [ESP32 controller](https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino): `esp32-no-lcd-moist.ino`
- [Sampling loop](https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino): `esp32-no-lcd-moist.ino`
- [Safe-value helper](https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino): `esp32-no-lcd-moist.ino`
- [JSON payload](https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino): `esp32-no-lcd-moist.ino`

### Machine sensing

- [MAX6675 sensor](https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino): `esp32-no-lcd-moist.ino`
- [PZEM-004T sensor](https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino): `esp32-no-lcd-moist.ino`
- [Moisture placeholder](https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino): `esp32-no-lcd-moist.ino`

### Network delivery

- [WiFi connection](https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino): `esp32-no-lcd-moist.ino`
- [HTTP client](https://github.com/fadilsnt/esp32-no-lcd-moist/blob/main/esp32-no-lcd-moist.ino): `esp32-no-lcd-moist.ino`

### Other components

- **WiFi network**
- **IoT 7K API**

## Connections

- ESP32 controller → Sampling loop: runs loop (evidence: `README.md`)
- Sampling loop → MAX6675 sensor: reads temperature (evidence: `README.md`)
- Sampling loop → PZEM-004T sensor: reads measurements (evidence: `README.md`)
- Sampling loop → Moisture placeholder: uses zero (evidence: `README.md`)
- Sampling loop → Safe-value helper: sanitizes readings (evidence: `README.md`)
- Sampling loop → JSON payload: builds JSON (evidence: `README.md`)
- ESP32 controller → WiFi connection: connects during setup (evidence: `README.md`)
- WiFi connection → WiFi network: joins network (evidence: `README.md`)
- Sampling loop → HTTP client: posts when connected (evidence: `README.md`)
- HTTP client → JSON payload: sends payload (evidence: `README.md`)
- HTTP client → IoT 7K API: posts readings (evidence: `README.md`)
- IoT 7K API → HTTP client: returns response (evidence: `README.md`)
