Noob questions

Hello,

I suggest you use millis as such, since i myself just learned it this way, so as to prevent the stack from overflowing and have a more performant timer.

if (millis() - previousMillis >= interval)
{
    previousmillis += interval
// . . . Your code goes here

}

Remember that after each IF statement you need to use "{ }".

For i to understand this i state it as such :

if (x, condition met) 
{ Execute what is within curly brackets }

same goes for ELSE statement.

As for your case of using LEFT variable name, your arduino will not know which is which, as you did define it now.

I suggest you use different name for each output pin, e.g

const int LEFT0 = 5;
const int LEFT1 = 6;
const int LEFT2 = 9;
const int LEFT3 = 10;

and if you get along with this you will have to define each single variable as output and trigger each one with its own delay.

Else, if you want arduino to know only one variable with different pins, then you will have to go for ARRAY [ ] . .

Hope this help . .

taz . .