I im trying to write such condition in C:
Problem is that PumpEnabled[0] variable must be checked only once. When microcontroller executes code second, third and etc.. time, condition PumpEnabled[0]==1 must be omitted. Tried to check PumpEnabled[0] variable only once with the help of for(i=0;i<1;i++) construction, but compiler gave me error. How how to write the code?
Rich (BB code):
if(j==1)
{
if(PumpEnabled[0]==1&&Fert1VolPassed<NeedFert1Amount){PORTC.B5=1;}
else {PORTC.B5=0; j=2;}
}