missing sensor error

This commit is contained in:
c3ma 2021-07-21 21:34:14 +02:00
parent d043d873cc
commit 2e052710e2
2 changed files with 8 additions and 0 deletions

View File

@ -82,6 +82,9 @@ public:
float getCurrentMoisture()
{
if(mMoisture_freq < MOIST_SENSOR_MIN_FRQ){
return MISSING_SENSOR;
}
return mMoisture_freq;
}

View File

@ -273,6 +273,11 @@ void readPowerSwitchedSensors()
mPlants[i].stopMoistureMeasurement();
}
for (int i = 0; i < MAX_PLANTS; i++)
{
Serial << "Plant " << i << " measurement: " << mPlants[i].getCurrentMoisture() << " hz" << endl;
}
waterRawSensor.clear();
Wire.setPins(SENSOR_TANK_TRG, SENSOR_TANK_ECHO);
Wire.begin();