stepsPerRevolution
parameter.stepsPerRevolution
. As the name suggests it’s the number of steps per revolution that our motor is rated at. Change this parameter as per your motor’s specification. For example, for NEMA 17 set it to 200 and for 28BYJ-48 set it to 48.setSpeed()
function and initialize the serial communication.step()
function which turns the motor a specific number of steps at a speed determined by setSpeed()
function. Passing a negative number to this function reverses the spinning direction of motor.