I would like to control a water pump so that if the water level in my bucket reaches a specified level, the pump starts sucking the water out of the bucket, and it keeps doing it until the water level reaches the bottom of the sensor. Then the pump should turn off. (Loop)
My water pump is an external (non-arduino) 5V component.
Is there a way to do that with Arduino at all?