// Turn on the first LED digitalWrite(ledPinArray[0],HIGH); digitalWrite(30,HIGH);

}

void loop(){

// read the state of the pushbutton buttonState = digitalRead(buttonPin);

// if the button is preseed if (buttonState == HIGH) {

// increment location in Array pos++;

// if the location is higher than the length of the array, set it back to 0 if(pos >= 16) { pos = 0; }

// turn on next LED digitalWrite(ledPinArray[pos], HIGH);

// Turns off last LED if(pos!=0) { // If the current possition isnt the first in the row digitalWrite(ledPinArray[pos-1], LOW); } else { // If it is, turn off the last one digitalWrite(ledPinArray[15],LOW); }

// without this, it will change LED's faster than you can let go of the button delay(70);