button to reverse direction with a potentiometer

This circuit that i've made should spin a stepper motor one way or the other, and, on the LCD, display on the first line the RPM and on the second, the direction of the motor.

In my circuit i added an i2C LCD. I want the LCD to display the following:
-the direction of the stepper motor (Left-Stop-Right(3 way switch))
-RPM of the motor instead of percentage of the potentiometer

When the motor is stopped(switch to the mid position) i want it to be deactivated(without power).
I want to increase the max motor speed, but keep the minimum.

My main problem is that when i activate (delete the comment) on the lines of code for the display(what to print), my stepper motor spins VERY slowly. (My stepper is: 42BYGH34 and driver A4988)

How can i solve these problems?Any tips?


Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Tom.... :slight_smile: