void get_measurement();
void thin_out();
void clear();
- void measure_until(float threshold = 0.01);
+ void wait_for_equilibrium(float threshold = 0.01);
};
#endif // MEASUREMENT_H
// Using this we can then numerically optimize p_e. Interval halving is used
// because it is foolproof, the precision needed is low and the evaluation is
// not computationally demanding.
-void Measurement::measure_until(float threshold = 0.01)
+void Measurement::wait_for_equilibrium(float threshold = 0.01)
{
while (m_size < 20 || threshold < calc_equilibrium_dist())
{
#include "PressureSensor.h"
#include "Valve.h"
+#include "Measurement.h"
static const int PRESSURE_SENSOR1_PIN = A1;
static const int PRESSURE_SENSOR2_PIN = A2;
while (1)
{
- measurement.measure_until();
- test_valve.open(10);
- measurement.measure_until();
- test_valve.close(100);
+ measurement.wait_for_equilibrium();
+ delay(10000);
}
}