Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
What is your code doing and not doing?
Did you write this code in stages?
Have you considered using newPing library, it will simplify your code.
https://github.com/PaulStoffregen/NewPing
It includes simple example code.
Before you repost your code, while in the IDE press CTRL-T, this will format your code with indents to help show your statement loops.
Can you post a diagram of the tank/sensor/pumps arrangement.
Can you also post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Thanks.. Tom... ![]()
PS I know its a lot, but you haven't supplied anything about your project to help us give you any advice.