multiple stepper motors on a uno 2x MotorKnob and Stepper Motor Control - speed

Having a problem with the code to get this working?

ERRORS EVERYWHERE

2X MotorKnob and 1X Stepper Motor Control - speed control

stepper 1

digi pin 0-3

ana pin 0 - potentiometer

stepper 2

digi pin 4-7

ana pin 1 - potentiometer

stepper 3

digi pin 8-11

ana pin 2 - potentiometer

Any help would be much appreciated

thanks kieren

You seem to have forgotten to post your code

Not only did you forget to post your code but you also forgot to give a link to the datasheet for the stepper motors you are using and a link to the stepper motor drivers you are using.

And you need to provide a diagram showing how everything is connected - especially the power supplies (note the plural).

...R

Stepper Motor 28BYJ-48 + ULN2003 Driver Module Board

I don't know where to start coding I made an attempt but it didn't seem to work and online videos aren't exactly helping, I posted this form because I'd wanted to know how to get this working, can you help

thanks
kieren

kierenandhiscamera:
I don't know where to start coding I made an attempt but it didn't seem to work

Post whatever code you have - it will provide a basis for further advice. At the moment you have given us nothing to work with.

There are lots of Threads on the forum about those stepper motors and drivers. Use Google to find them.
Google stepper ULN2003 site:Arduino.cc

...R

all I want to find out is how to change the pins on MotorKnob code

/*
* MotorKnob
*
* A stepper motor follows the turns of a potentiometer
* (or other sensor) on analog input 0.
*
* http://www.arduino.cc/en/Reference/Stepper
* This example code is in the public domain.
*/

#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 100

// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 8, 9, 10, 11);

// the previous reading from the analog input
int previous = 0;

void setup()
{
 // set the speed of the motor to 30 RPMs
 stepper.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
 stepper.step(val - previous);

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

and Stepper Motor Control - speed control

/* 
Stepper Motor Control - speed control

This program drives a unipolar or bipolar stepper motor. 
The motor is attached to digital pins 8 - 11 of the Arduino.
A potentiometer is connected to analog input 0.

The motor will rotate in a clockwise direction. The higher the potentiometer value,
the faster the motor speed. Because setSpeed() sets the delay between steps, 
you may notice the motor is less responsive to changes in the sensor value at
low speeds.

Created 30 Nov. 2009
Modified 28 Oct 2010
by Tom Igoe

*/

#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);
 } 
}

Help me to help you!

Bold underlined text is no more informative than normal text.

Read How to Use the Forum and post your code with code tags so it looks like this Use the button like the image below.

You have two completely separate program in your Post and I only found that out after I loaded the code into my text editor.

As far as I can see you have not made any changes to those two programs. Earlier you said

I made an attempt but it didn't seem to work

. Post that code and then we can see the difficulties that you see and can give some practical advice.

...R

2014-11-04_0-01-25.jpg

the

I made an attempt but it didn't seem to work

was every time i changed any pin numbers it errored?

changes made?

kierenandhiscamera:
the was every time i changed any pin numbers it errored?

changes made?

I can't help when you only give inadequate information like this.

I don't understand how you think that I could.

...R