Problem getting the correct speed on my NEMA17+A4489+potentiometer project

Did you try to remove the Serial.print() ?