|
Re: Solenoid control
Here is the way to do this:
if (p3_sw_trig) //no semi colons for functions
{
relay3_fwd = 1;
}
else (!p3_sw_trig)
{
relay3_fwd = 0;
}
else if (p3_sw_top) //or if is fine here also
{
relay3_rev = 1;
}
else
{
relay3_rev = 0;
}
Last edited by reilly : 07-02-2005 at 00:47.
|