Sluice
Automated hydroponics with nutrient dosing, pH sensing, and light control — Raspberry Pi orchestration over Arduino sensor nodes.
Problem
Small hydroponic setups fail quietly when pH drifts or dosing schedules slip. Sluice automates nutrient delivery, environmental sensing, and grow-light timing so operators get closed-loop control instead of manual spot checks.
What it covers
- pH, humidity, and light sensing with calibrated ADC reads
- Nutrient pump and grow-light actuation schedules
- Raspberry Pi edge controller with Arduino sensor front-ends
- AWS IoT telemetry path for remote monitoring trials
void PHSensor::init(const PinConfig& pins, const CalibrationData& calibration) {
this->pins = pins;
this->calibration = calibration;
analogReadResolution(static_cast<int>(adcResolution * 1000));
readingState.lastSampleMs = millis();
initialized = true;
}
float PHSensor::readCalibrated() {
const float raw = sampleAveragedAdc();
return (raw * pHSlope) + pHIntercept;
}