This function repeatedly closes and opens the valve. This is meant to
ensure the volumes of the valve to properly equilibrate.
void open(float seconds = 5);
void close(float seconds = 5);
+ void close_open_clean(unsigned int count = 3);
};
#endif // VALVE_H
{
m_servo.writeMicroseconds(m_usec_current);
}
+
+void Valve::close_open_clean(unsigned int count)
+{
+ while (count > 0)
+ {
+ close(3);
+ delay(500);
+ open(3);
+ delay(500);
+ --count;
+ }
+}