Agricultural Dashboards: Tri-Variable Environment Monitor
Monitoring basic humidity is a beginner task. The Tri-Variable Environment Monitor mimics the massive dashboards used in professional hydroponic farming operations. It requires the programmer to simultaneously manage both hyper-precise digital I2C data (air) and wildly chaotic analog resistance arrays (water depth), combining them into a single, cohesive LED alert system.

Analog Water Depth Sensing (The Resistance Trace)
A float switch only tells you if the water is "High" or "Low". A Water Level Depth Sensor gives you a massive continuous measurement of the exact water volume remaining in the irrigation reservoir!
- The Physics: The sensor is an exposed PCB with long, parallel copper traces. As submerged in water (which conducts electricity slightly), the total 5V resistance bridging across the traces drops mathematically.
- The Arduino reads
analogRead(A0). - If the reservoir is completely dry, the analog value is
0. - If submerged 2 centimeters, it reads
300. If submerged 4 centimeters, it reads650. - The C++ code uses
<map()>to convert0-800into0-100% Volume!
Multi-Factor Display Parsing
The Arduino must not freeze while calculating the air temp via a DHT22 or BME280.
- All three variables (
Temp = 24.5C,Hum = 60%,Water = 45%) are structured into strings. - The LCD Pagination Algorithm: An aggressive 16x2 LCD is too small to show all 3 cleanly. You must program a mathematical scrolling screen timer.
if ((millis() / 3000) % 2 == 0) { // Screen A
lcd.print("T:" + String(temp) + " H:" + String(hum));
} else { // Screen B
lcd.print("Tank Level: " + String(waterLvl) + "%");
}
- A critical Buzzer Alarm function overrides the screen entirely, flashing
CRITICAL DROP!if the water level plummets below 10%, alerting the farmer before the massive water pumps run dry and explode!
Environmental Tracing Hardware
- Arduino Uno/Nano.
- Analog Water Level Depth Detection Sensor (Long exposed PCB traces).
- DHT22 precision Temp/Humidity sensor.
- 16x2 I2C Character LCD Display (For clean, 4-wire menu formatting).
- Active Piezo Buzzer as the catastrophic low-water-level alarm.