No Bob It still gives ledPIn not recognised
int i;
int led2=2;
int led3=3;
int led4=4;
int led5=5;
int ledPin10=10;
int ledPin11=11;
int ledPin12=12;
int ledPin13=13;
void setup() {
// put your setup code here, to run once:
pinMode(led2,OUTPUT);
pinMode(led5,OUTPUT);
pinMode(ledPin10,OUTPUT);
pinMode(ledPin11,OUTPUT);
pinMode(ledPin12,OUTPUT);
pinMode(ledPin13,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(led2,LOW);
leds();
digitalWrite(led2,HIGH);
/* digitalWrite(led3,LOW);
leds();
digitalWrite(led3,HIGH);
digitalWrite(led4,LOW);
leds();
digitalWrite(led4,HIGH); */
digitalWrite(led5,LOW);
leds();
digitalWrite(led5,HIGH);
}
void leds()
{
for (i=10;i<14;i++)
{
digitalWrite(ledPin(i), HIGH); // turn the LED on (HIGH is the voltage level)
delay(10); // wait for a second
digitalWrite(ledPin(i), LOW); // turn the LED off by making the voltage LOW
}
I have changed it all the way through the program with no improvement?
AWOL I was hoping to do it this way.