please help robotic hand

hi there , i just bought an arduino uno and a pololu microcontroller so i can use flex sensors to control a robotic hand . i have found all the relevant wiring diagrams needed and have successfully built what i needed ....here comes the hard part lol , completely new to programming so i'm begging for some help .

i have found code for moving servo's via flex sensors using the analog outputs but after 2 weeks of searching have yet to find digital ??

looking at other peoples projects i know the digi out from the arduino goes to the digi in of the servo controller ( pololu )

can anyone help please ...please

i have a very close deadline of 29th oct 2011 and any advice would be gratefully recieved :-)

i have found code for moving servo's via flex sensors using the analog outputs but after 2 weeks of searching have yet to find digital ??

Can you explain what this sentence means, please?

rayplon: i have found code for moving servo's via flex sensors using the analog outputs but after 2 weeks of searching have yet to find digital ??

Amazing that you can find something that is non-existent in Arduino (true analog outputs), but cannot find the most common feature in it (digital pins).

rayplon: i have a very close deadline of 29th oct 2011 and any advice would be gratefully recieved :-)

Looks like you're going to miss it.

lol ye you can see how new i am to this , what i meant was i have seen how 6 servo's were controlled with flex sensors on analog in and the signal lead to the servos connected to six digi pins

the circuit i have has 1 lead from tx to my servo controller

Can you maybe stop speaking txt and try English?

#include <Servo.h>

Servo myservo1; // create servo object to control a servo
Servo myservo2;
Servo myservo3;
Servo myservo4;
Servo myservo5;

int potpin1 = 0; // analog pin used to connect the potentiometer
int potpin2 = 1;
int potpin3 = 2;
int potpin4 = 3;
int potpin5 = 4;
int val1; // variable to read the value from the analog pin
int val2;
int val3;
int val4 ;
int val5;

void setup()
{
myservo1.attach(8); // attaches the servo on pin 9 to the servo object
myservo2.attach(9);
myservo3.attach(10);
myservo4.attach(11);
myservo5.attach(12);
}

void loop()
{
val1 = analogRead(potpin1); // reads the value of the potentiometer (value between 0 and 1023)
val1 = map(val1,150,179,90,179);
val2 = analogRead(potpin2);
val2 = map(val2,150,179,90,179);
val3 = analogRead(potpin3);
val3 = map(val3,150,179,90,179);
val4 = analogRead(potpin4);
val4 = map(val4,150,179,90,179);
val5 = analogRead(potpin5);
val5 = map(val5, 150, 179, 90, 179); // scale it to use it with the servo (value between 0 and 180)
myservo1.write(val1); // sets the servo position according to the scaled value
myservo2.write(val2);
myservo3.write(val3);
myservo4.write(val4);
myservo5.write(val5);
delay(5); // waits for the servo to get there
}

This is the code i am currently running , with six flex sensors controlling six servo motors . After being told to use a pololu servo controller i will need to change the code so that the “tx” on the arduino tells the servo controller which servo to move and how far

Any really good reason for not using arrays? (that's only five servos, BTW, not six)

val1 = analogRead(potpin1); // reads the value of the potentiometer (value between 0 and 1023)
    val1 = map(val1,150,179,90,179);

Since analogRead can return a value between 0 and 1023, shouldn't your from range be 0 to 1023, also?

Have you measured the actual values that you get, to determine that they are indeed limited to 150 to 179?