Please read and follow the directions in the "How to use this forum" post.
In this case post the code, using code tags, links to the motor, the motor driver and the motor power supply, and a schematic diagram of your wiring.
Most problems with step motors reported on this forum are due to inadequate motor power supplies, the wrong motor/driver combination and/or failure to set the driver current limit properly.
// 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;
}
The example is intended for a SN754410NE H-Bridge motor driver, and not the TB6600 motor driver. The AccelStepper library works with STEP/DIR motor drivers.