Preventing vibrations Servo and flexi sensor

I'm building a glove to control a robotic hand and I can not get precision motion I try different lines of code anyone has a suggestion

Without knowing anything about your solution, it's impossible to advise. I suggest you post your code, and a circuit diagram showing what hardware you have connected and how it is being powered, and explain what sort of 'precision motion' you're aiming for and how the current solution falls short.

There are two other current discussions in the forum concerning using flex sensors and servos that you might want to read (perhaps you have the same assignment).

//This is the code
#include <Servo.h>

Servo myservo; // create servo object to control a servo
Servo myservo2; // create servo object to control a servo

int potentiometer = 0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin
int potentiometer2 = 1; // analog pin used to connect the potentiometer
int val2; // variable to read the value from the analog pin
int Position=0;
int Position2=0;
void setup()
{
Serial.begin(9600);
myservo2.attach(10); // attaches the servo on pin 10 to the servo object
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}

void loop()

{

val = analogRead(potentiometer); // reads the value of the potentiometer (value between 0 and 1023)
val2 = analogRead(potentiometer2); // reads the value of the potentiometer (value between 0 and 1023)
//??? 0
if(val>223) //max value is 306 pin9
{Serial.println(“Position 0 top”);
Serial.println(val);
myservo.write(0);

}
if(val2>243) //max value is 306 pin9
{Serial.println(“position 0 down”);
Serial.println(val2);
myservo2.write(0);

}
//??? 45
if(184<val<200) //min value is 135 pin10
{Serial.println(“position 45 top”);
Serial.println(val);
for(Position=0;Position<35;Position++) // scale it to use it with the servo (value between 0 and 180)
{myservo.write(Position);}
}
if(203<val2<240) //min value is 135 pin10
{Serial.println(“Position 45 down”);
Serial.println(val2);
for(Position2=0;Position2<35;Position2++) //
{myservo2.write(Position2);}

}
//??? 90
if(val<164) //min value is 135 pin10
{Serial.println(“Position 90 top”);
Serial.println(val);
for(Position=35;Position<90;Position++)
{myservo.write(Position);}
}
if(val2<190) //min value is 135 pin10
{Serial.println(“Position 90 down”);
Serial.println(val2);
for(Position2=35;Position2<90;Position2++)
{ myservo2.write(Position2);
}
}

delay(300);
}

#7 below for your code.

http://arduino.cc/forum/index.php/topic,148850.0.html