Newb Servo issues

Hey guys I’m new here. Little bit of background info. I am a 19 year old Drexel University freshman in Philadelphia, PA. I am currently doing my final project for the year. My group has decided to interface EMG tech with an Arduino to make a hand prosthesis.

The original idea was to make the middle finger to the pinky as one unit, index finger and thumb move independently of each other. To make things simpler for the time being we decided to move the four finger as a unit and forget about the thumb. We are going to use electrodes attached to our hand/forearm to send a signal through the Olimex EKG-EMG shield (SHIELD-EKG-EMG - Open Source Hardware Board) and then send a signal to a servo to spin and open the hand.

Our issue at this point in the project is getting an unhacked servo to spin more than 90* with a shield attached. Without a shield, I can get the servo to spin 180*. I have tried two different shields and two different servos and still can not get the servo(s) to spin more than 90*.

Attached is a copy of the code I am using to trouble shoot the servo.

ServoResistor.ino (821 Bytes)

Why don't you try writing a sketch to command the servo directly, and once that works
correctly, add in the bit about the analogRead().

That's how you do this stuff. Write the different parts in "isolation", test them, fix them,
and then combine them. It's 10X easier to troubleshoot that way.

Servo/pot test code that might be of use as it prints values to the serial monitor for troubleshooting.

//zoomkat dual pot/servo test 12-29-12
//view output using the serial monitor

#include <Servo.h> 
Servo myservo1;
Servo myservo2;

int potpin1 = 0;  //analog input pin A0
int potpin2 = 1;

int newval1, oldval1;
int newval2, oldval2;

void setup() 
  Serial.println("testing dual pot servo");  

void loop() 
  newval1 = analogRead(potpin1);           
  newval1 = map(newval1, 0, 1023, 0, 179); 
  if (newval1 < (oldval1-2) || newval1 > (oldval1+2)){  
    Serial.print("1- ");

  newval2 = analogRead(potpin2);
  newval2 = map(newval2, 0, 1023, 0, 179);
  if (newval2 < (oldval2-2) || newval2 > (oldval2+2)){  
    Serial.print("2- ");    
  delay(50); // adjust as needed for viewing output

A “sail winch” servo will give 360 degree or more rotation, unhacked.

hi , i have the same shield and have EMG sensor

but i can't get signal to move servo motors any one have code or any way to get analog signal from this shield i try to make code but i failed
is this shield used only to make heart rate analysis in elecguru program ?