import time
from motor import PWMMotor


MOTOR_PIN_A = 2
MOTOR_PIN_B = 3
PUMP_ON_TIME = 60
PUMP_SLEEP_TIME = 60 * 9

pump = PWMMotor(MOTOR_PIN_A, MOTOR_PIN_B)

print("Initialized motor. Beginning pump service.")

while True:
    print(f"Staring pump for {PUMP_ON_TIME}")
    pump.set_speed(1.0)
    time.sleep(PUMP_ON_TIME)
    print(f"Stopping pump and sleeping. {PUMP_SLEEP_TIME}")
    pump.stop()
    time.sleep(PUMP_SLEEP_TIME)
