from machine import Pin
from time import sleep
from A49988 import A49988
# Initialize the motor driver with appropriate GPIO pins
step_pin = 15
direction_pin = 2
ms_pin = [4, 5, 6]
motor = A49988(step_pin, direction_pin, ms_pin)
# Get the number of steps from the user
number_of_steps = int(input("Enter the number of steps to move: "))
# Move the motor by the specified number of steps
motor.move_steps(number_of_steps)
# Example: Move motor to a specific angle
motor.move_angle(90)
# Example: Change motor direction
motor.change_direction()