hay guys
i know i must be doing something stupid here but for the life of me, i can't see it.
The action in the IF statement seems to b activated every cycal although the condition isnt being met! what am i missing here?
thanks
int inc = 20;
void setup() {
}
void loop()
{
for (int i =40; i<1000 ; i=i+inc){
if (i<=0 || i >= 1000);{
(inc = -inc);
}
Serial.print("i = ");
Serial.println(i);
Serial.print("inc = ");
Serial.println(inc);
delay(10);
}
}