HELP clockwise and Sensor data printing issues

Hi
My Stepper motor has clockwise rotation and back
When I delete my clockwise lines, Sensor's code printing data very fast as well on Monitor in Arduino, but when I add clockwise lines to my code, the Sensor's code print the data very slow and step by step.
Any help ! :slight_smile:

void setup()
{
Serial.begin (9600);

}

void loop() {
x = (y);
y = (x);
z = z;
Serial.print(x+y+z);

Serial.println("clockwise");
motor.step(stepsPerRevolution);
delay(500);

Serial.println("counterclockwise");
motor.step(-stepsPerRevolution);
delay(500);

}

your code is incomplete so no one can help