[quote author=matelot link=topic=232563.msg1675710#msg1675710 date=1397224145]
Is it possible to just change the variable in each pass of digitalWrite and if so, what is the format?
[code] for (i=10;i<14;i++)
{
digitalWrite(led(i), HIGH); // turn the LED on
delay(10); // wait for a second
digitalWrite(led(i), LOW);
delay(10);
Doing this just returns
led not assigned.
I have tried (led'i', HIGH); with the same error instruction.
Which format is it?
thanks.
[/quote]
This will work
code] for (i=10;i<14;i++)
{
digitalWrite(i, HIGH); // turn the LED on
delay(10); // wait for a second
digitalWrite(i, LOW);
delay(10);
[/code]
delay(10); // wait for a second
In fact that will wait for 0.01 of a second