Controlling a button
What you made so far is only turn on and off LED according to button state. I believe there's more efficient code out there, but you can try:

int x = 11;

 void setup() {
 for(int i=11; i &lt;= 18; i++) pinMode(i, OUTPUT); //assuming the led is on pin 11-18
 }

 void turnLED(int num)
 {
     for(int i=11; i &lt;= 18; i++) 
         if (num==i) digitalWrite(i,HIGH); else
                     digitalWrite(i,LOW);
 }

 void loop() {

    if (digitalRead(buttonRight)) 
    {
        x++;
        if (x&gt;18) x=18;
    }
    else if (digitalRead(buttonLeft))
    {
        x--;
        if (x&lt;11) x=11;
    }
    turnLED(x); //turn LED on according to value of 'x'
    delay(500); 
}