int pointer = 13;
int i = 1;
int counter = 0;
void setup() {
// put your setup code here, to run once:
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(pointer, HIGH);
delay(30);
digitalWrite(pointer, LOW);
pointer = pointer - i;
if(pointer <=9 || pointer >=13){
i = -i;
}
delay(100);
}