flex sensor to speaker

int potPin = 2; // select the input pin for the potentiometer
int speakerPin = 8;

int val = 0;

void setup() {
pinMode(speakerPin, OUTPUT);
Serial.begin(9600);
}

void loop() {
Serial.println(val);
digitalWrite(speakerPin, LOW);

val = analogRead(potPin); // read value from the sensor
val = val/4; // process the value a little
//val = val/2; // process the value a little

for( int i=0; i