Post what you have so far using code tags.
Here you go..
/*
*Header tank control
*/
int led = 13; // Indicator LED on pin 13
int floatSwitch = 2; // Float switch on pin 2
int switchValue;
int relay = 5;
void setup()
{
pinMode(led, OUTPUT);
pinMode(relay, OUTPUT);
pinMode(floatSwitch, INPUT);
digitalWrite(floatSwitch, HIGH);
}
void loop()
{
switchValue = digitalRead(floatSwitch);
if (switchValue == HIGH)
{
digitalWrite(led, LOW);
digitalWrite(relay, HIGH);
}
else
{
digitalWrite(led, HIGH);
digitalWrite(relay, LOW);
}
}
Sounds like you want something vaguely like this.
Interrogate the lower switch over and over until it says the tank is empty
Start filling the tank
Interrogate the upper switch over and over until it says the tank is full
Stop filling the tank
Repeat
However, if the task is really as simple as you describe it, you could probably just design a simple circuit to do it, probably with a double-pole relay as a latch.
I could do it without an arduino but I'm planning to add more features to it such as datalogging.