How to program pressure sensor and motor with motor shield I was working on controlling a high power motor with a heavy duty motor controller, and I was able to make my motor spin, but I wasn't able to incorporate a program for my pressure sensor and make it determine the speed of the motor.  I'm pretty sure I connected the parts correctly on my circuit board, so I figure my code must have some mistake, or something missing.
The pressure sensor I'm using: 
The motor controller I'm using: http://www.robotshop.com/en/arduino-compatible-mega-motor-shield-1a-5-28v.html#Useful 
The code I have: 

int motorValue=0;
int sensorValue=0;
int sensorPin=A0;
int EnablePin=8;
int PWMPin2=3; 

void setup() {
  // put your setup code here, to run once:
pinMode(EnablePin, OUTPUT);
//pinMode(sensorPin, OUTPUT);
Serial.begin(9600);
pinMode(PWMPin2, OUTPUT);
pinMode(sensorPin, INPUT);
}

void loop() {
// put your main code here, to run repeatedly:
sensorValue = analogRead(sensorPin);

//float voltage = sensorValue * (5.0 / 1023.0);

//Serial.println(voltage);

delay(50);

motorValue=map(sensorValue,0,1023,0,255);
//motorValue=sensorValue / 4;
//analogWrite(motorPin,motorValue);
digitalWrite(EnablePin, HIGH);
analogWrite(PWMPin2, motorValue);
}


Edit: The sensor works by reading the voltage.  Here's an actual picture of how I wired it:  I used this wiring to print out the voltage with just the Arduino and it worked, and I'm using it with the same wiring but while having the motor shield on top, so that's why I'm guessing that I must not be programming the sensor right with the motor controller.  I couldn't get the voltage readings when I used this setup with the motor driver shield.
Depending on the jumper settings, the MegaMoto shield will drive current sense voltages onto one or two of the Arduino analog inputs.

Your picture shows the shunt installed to drive A0, which is of course going to conflict with your attempt to use the same pin for the force sensor.

If you are not using current feedback, it seems like you may be able to just remove that jumper, otherwise you will need to pick distinct pins for the current sense and your force sensor.  Consult the manual to be certain.

(The other placement of the other jumper in that block looks a bit suspicious too, almost seems it may be shorting the two current sense channels together, but not certain about that)