Arduino Motor Shield R3 Help

wiring sounds correct, without knowing the specs of your motor.

It does sound like your code though. The r3 board, I think, uses different parameters.

I'm just learning this myself.

I was able to get this code to work though. Its basically the knob stepper example, but for the R3 motor shield. The values on the potentiometer could be played with to get better motion. Potiometer wiper to Analog 0, one end of the element to GND, other end to Vin.

#include <Stepper.h>

const int stepsPerRevolution = 48; // change this to fit the number of steps per revolution
// for your motor

// initialize the stepper library on the motor shield
Stepper myStepper(stepsPerRevolution,12,13);

// give the motor control pins names:
const int pwmA = 3;
const int pwmB = 11;
const int brakeA = 9;
const int brakeB = 8;

int previous = 0;

void setup() {
Serial.begin(9600);
// set the PWM and brake pins so that the direction pins // can be used to control the motor:
pinMode(pwmA, OUTPUT);
pinMode(pwmB, OUTPUT);
pinMode(brakeA, OUTPUT);
pinMode(brakeB, OUTPUT);
digitalWrite(pwmA, HIGH);
digitalWrite(pwmB, HIGH);
digitalWrite(brakeA, LOW);
digitalWrite(brakeB, LOW);
// initialize the serial port:
Serial.begin(9600);
// set the motor speed (for multiple steps only):
myStepper.setSpeed(30);
}

void loop() {
// get the sensor value
int val = analogRead(0);

// move a number of steps equal to the change in the
// sensor reading
myStepper.step(val - previous);

// remember the previous value of the sensor
previous = val;
}