controlling a stepper motor, from a stand-alone L293D to a motorshield

Hi. I’m building a peristaltic pump using a stepper motor controlled by a potentiometer+arduino
I followed the great instruction found on that webpage

but instead of using SN754410ne H-Bridge I took a L293D from a motor shield board L293D ( the one from amazon at $8.99)

It works great, but I’d like to get ride of the board and all the wires and because it’s not convenient and messy I’d like to connect everything through the motorshield, and because I will be dealing with tubing, water and lot of others stuff I do not have wires all around. However, the code I’m using (see below), does not work when I connect the stepper motor through the motorshield. I guess it has to do with the digital entry 8,9,10,11, which are not accessible when you stack the motor shield on top of the Uno…What do I have to change into the code to make it work?
Also, I noticed even when the potentiometer is turn to zero, the motor is still under “tension” and you can hear a little noise, so it will be great to add a button switch off…where to put it on the and how to connect it to the motorshield? thank for your input!

#include <Stepper.h>

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


// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

int stepCount = 0;  // number of steps the motor has taken

void setup() {
  // nothing to do inside the setup
}

void loop() {
  // read the sensor value:
  int sensorReading = analogRead(A0);
  // map it to a range from 0 to 100:
  int motorSpeed = map(sensorReading, 0, 1023, 0, 100);
  // set the motor speed:
  if (motorSpeed > 0) {
    myStepper.setSpeed(motorSpeed);
    // step 1/100 of a revolution:
    myStepper.step(stepsPerRevolution / 100);
  }
}

and I forgot to add, the second reason and in fact main reason is that I need a second stepper to run controlled by a second potentiometer..so a motorshield is needed!

djeh1usa:
I took a L293D from a motor shield board L293D ( the one from amazon at $8.99)

It works great, but I'd like to get ride of the board

I'm confused.

The first sentence I have quoted seems to say that you have already removed the L293d from the board. If so I don't understand why you are asking about getting rid of the board.

An L293D (or any H-bridge) is a poor choice for driving a stepper motor. If you use a specialized stepper driver such as a Pololu DRV8825 it will take a lot of the computation off the Arduino which helps if you want to run two motors.

Have a look at these links
Stepper Motor Basics
Simple Stepper Code

also look up the AccelStepper library

...R

I took out only the L293D from the motorshield, in order to duplicate the webpage result. Now, I want to pu back the L293D on the motor shield and get ride of all the wiring, and getting 2 steppers motor running from the same motor shield...sorry if it was confusing!