ich have problems to control my stepper with the TOS-100 shield.
I’m using a Arduino Uno, Trinamic TOS-100 and a Nanotec Stepper
When I use the example sketch from the TOS the motor is running. Now I tried to write my own.
My problem is now that the motor rotates continuously.
If I add a delay of 2000ms the motor does not rotate, but is buzzing only.
If I add a stop, I have the same problem.
The motor should rotate 200 steps, then stop and turn back to 2000ms 200 steps.
Maybe you could help me to find my fault.
Looking foreward to your answers
The Code looks like:
//we have a stepper motor with 200 steps per rotation, CS pin 2, dir pin 6, step pin 7 and a current of 300mA
//TMC26XStepper tmc26XStepper = TMC26XStepper(200,2,6,7,900);
TMC26XStepper tmc26XStepper = TMC26XStepper(200,2,6,7,900);
int speed = 0;
int speedDirection = 100;
int maxSpeed = 1000;
tmc26XStepper.setSpeed(30); // Motorgeschwindigkeit 30rpm
tmc26XStepper.move(); //Starte Motor