Dear friends of the forum,
very recently I got Arduino UNO and I have started my first "programs" very simple just to get me familiar with Arduino.
I need you help i the follows:
I have one for loop like the sample bellow
for (int x=0; x <= 5; x++){
digitalWrite(led(x), HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led(x), LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
What I tried there is to construct using for loop the variable led1, led2, led3... led6 but the above litle code does not work...
What I need in order to make it work?
Thanks in advance
PS I have const declaration for led like the bellow:
const int led1 = 13;
const int led2 = 12;
const int led3 = 8;
const int led4 = 7;
const int led5 = 4;
const int led6 = 2;