I would like to code for automatic pump controller,
i used scr, float switches, relays and contactor to make my pump to function automatically,
now im willing to make a code for the same on arduino,
my float switch will be switched ON when it floats and switched OFF when doesn't float,
if i use
if (digitalRead(pinFloat1) == HIGH)
// when float sensor doesnt float, pump will turn ON, but the float sensor will float within seconds, before the tank gets filled, which in turn will switch OFF the pump.
{
digitalWrite(pinPump, HIGH);
}
i need code to turn ON the pump, when 1st float switch is HIGH (pump should not turn off when this pin goes LOW) and to turn OFF the pump when 2nd float switch is ON
please help me with your code.. if you can mention comments.
will your code will function similar to scr?
thanks in advance regards Jay
My code wouldn't do you any good. My code knows how my switches are wired. Without knowing how your switches are wired, my code won't properly deal with your switches.
Reading the state of one switch, and using that state to turn the pump on, is trivial.
Reading the state of another switch, and using that state to turn the pump off, if it is on, is trivial.
What does your code? What does it not do that you want it to do? What does it do that you do not want it to do? How ARE your switches wired?
You want to know if some code will function similar to a piece of hardware? That's like asking if your code will function similar to a banana. In what way?
If you had capitalized SCR as it is an acronym, I might have understood better.
i need code to turn ON the pump, ... now im willing to make a code
This is just laziness, not using capitals or punctuation. You aren't writing on a mobile phone. Take the trouble to form proper sentences, capitalize things, and show some respect for the people you expect to help you.
sir, i not good in c++, few days ago i started to learn arduino with the help of example programs , im asking for help to make a code, Which will function similar to SCR.
// when float sensor doesnt float, pump will turn ON, but the float sensor will float within seconds, before the tank gets filled, which in turn will switch OFF the pump.
{
digitalWrite(pinPump, HIGH);
}
i need code to turn ON the pump, when 1st float switch is HIGH (pump should not turn off when this pin goes LOW) and to turn OFF the pump when 2nd float switch is ON
You seem to have code to switch the pump on.
Similar code linked to the OFF switch should turn it off. When you set a pin HIGH it stays that way until you set it LOW.
It will be easier to help if you post a complete program - even if it does not work.