This stepper motor library is a driver written for using ULN2003 with 28YBJ48 stepper motor.
Product Link(https://www.dfrobot.com.cn/)
SKU:FIT0999
Control the rotation of stepper motor
- Precisely control the number of rotation steps of the stepper motor.
- Can control stepper motor rotation direction and speed.
To use this library download the zip file, uncompress it to a folder named DFRobot_Stepper. Download the zip file first to use this library and uncompress it to a folder named DFRobot_Stepper.
/**
* @fn DFRobot_Stepper
* @brief Constructor for DFRobot_Stepper
* @param totalSteps: the number of steps required for the stepper motor to make one complete revolution
* @param INAPin: control pin for INA
* @param INBPin: control pin for INB
* @param INCPin: control pin for INC
* @param INDPin: control pin for IND
*/
DFRobot_Stepper(int totalSteps, int INAPin, int INBPin, int INCPin, int INDPin);
/**
* @fn setSpeed
* @brief Set the rotation speed of the stepper motor
* @param speed: sets the actual rotation speed of the stepper motor, in RPM (Revolutions Per Minute)
*/
void setSpeed(long speed);
/**
* @fn step
* @brief Set the number of steps for the stepper motor to rotate
* @param stepNum: the number of steps the stepper motor will rotate, where the direction is determined by the sign of the number
*/
void step(int stepNum);
| MCU | Work Well | Work Wrong | Untested | Remarks |
|---|---|---|---|---|
| Arduino uno | √ | |||
| FireBeetle esp32 | √ | |||
| FireBeetle esp8266 | √ | |||
| FireBeetle m0 | √ | |||
| Leonardo | √ | |||
| Microbit | √ | |||
| Arduino MEGA2560 | √ |
- 2024/04/28 - Version 1.0.0 released.
Written by XiaoWu(xiao.wu@dfrobot.com), 2024. (Welcome to our website)