Can anyone tell me what is more fast for ardunio execute, this is for turn on/off leds:
for(i=0; i<7; i++){
if(ABC == 1)
_ digitalWrite(Lar*, HIGH);_
_ digitalWrite(Lar, LOW);
}
[/quote]
or
> if(ABC[0] == 1)
> digitalWrite(Lar[0], HIGH);
> if(ABC[1] == 1)
> digitalWrite(Lar[1], HIGH);
> if(ABC[2] == 1)
> digitalWrite(Lar[2], HIGH);
> if(ABC[l][j][3] == 1)
> digitalWrite(Lar[3], HIGH);
> if(ABC[4] == 1)
> digitalWrite(Lar[4], HIGH);
> if(ABC[5] == 1)
> digitalWrite(Lar[5], HIGH);
> if(ABC[6] == 1)
> digitalWrite(Lar[6], HIGH);
> digitalWrite(Lar[0], LOW);
> digitalWrite(Lar[1], LOW);
> digitalWrite(Lar[2], LOW);
> digitalWrite(Lar[3], LOW);
> digitalWrite(Lar[4], LOW);
> digitalWrite(Lar[5], LOW);
> digitalWrite(Lar[6], LOW);*_