                     }
             delay(250);
             }
+            else {
+
+		    i=abs(sliderState/100);
+                    digitalWrite(LATCH,0);
+                    shiftOut(DATA,CLOCK,MSBFIRST,~(ledCharSet[i]));
+                    digitalWrite(LATCH,1);
+
+	    }
             delay(10);
     }
 

    #define CLOCK 13
    #define DATA 11
    #define pushButton 7
     
     
    /*
     clk=/sys/class/gpio/gpio2
     serial=/sys/class/gpio/gpio4
     latch=/sys/class/gpio/gpio5
    */
    const byte ledCharSet[10] = {
     
      B00111111,B00000110,B01011011,B01001111,B01100110,B01101101,B01111101,B00000111,B01111111,B01101111
    };
     
    void setup(){

     
    void loop(){
            int buttonState = digitalRead(pushButton);
	    int sliderState = analogRead(sliderPot);
            /* Serial.println("Seven segment display test"); */
            /* print out the state of the button: */
            /* delay in between reads for stability */
            if (!buttonState) {
                    digitalWrite(LATCH,0);
