inline bool wait_for(bool value, unsigned int timeout) { timeout += millis(); while (echo->read_digital() != value) if (millis() > timeout) return false; return true; }