static constexpr int PRESSURE_SENSOR_VALVE_PIN = 11;
static constexpr int VACUUM_VALVE_PIN = 12;
-static constexpr unsigned long CELL_BARELY_OPEN_EQUILIBRATION_MS = 30000;
+static constexpr unsigned long CELL_BARELY_OPEN_EQUILIBRATION_MS = 60000;
static constexpr unsigned long EVACUATION_LONG_MS = 600000;
static constexpr unsigned long EVACUATION_MS = 60000;
static constexpr unsigned int THREEWAY_TURNS_TO_FILL = 1;
static constexpr float MEASUREMENT_UPPER_LIMIT = 8;
-static constexpr float MEASUREMENT_LOWER_LIMIT = 0.5;
+static constexpr float MEASUREMENT_LOWER_LIMIT = 0.1;
void threeway_fill(Valve &threeway_valve, unsigned int count)
{
while (count > 0)
{
threeway_valve.open_barely();
+ delay(500);
threeway_valve.open();
--count;
}
//PressureSensor sensor_3{PRESSURE_SENSOR3_PIN, 10, 241};
Measurement measurement{sensor_1};
Valve vacuum_valve{VACUUM_VALVE_PIN, 2295, 1494, 802};
- Valve cell_valve{CELL_VALVE_PIN, 2000, 1535, 1276};
+ Valve cell_valve{CELL_VALVE_PIN, 2000, 1605, 1230};
Valve gas_threeway_valve{GAS_VALVE_PIN, 1301, 2036, 1641};
vacuum_valve.close();
delay(CELL_BARELY_OPEN_EQUILIBRATION_MS);
cell_valve.open();
delay(10000);
+ cell_valve.close();
vacuum_valve.close();
signal_going_to_sleep();
while (digitalRead(SWITCH_PIN) == LOW)