Product Introduction
1/17/2018 FireBeetle Covers-DC Motor & Stepper Driver SKU:DFR0508 - DFRobot Electronic Product Wiki and Tutorial: Arduino and Robot Wiki-DFRobot…
https://www.dfrobot.com/wiki/index.php/FireBeetle_Covers-DC_Motor_%26_Stepper_Driver_SKU:DFR0508#More 8/12
4. Reverse the function of group A stepper motor
reverse_SA()
DC Motor & Stepper Motor Drive
FireBeetle Covers-DC Motor&Stepper Driver can control a stepper motor and 2 DC motors simultaneously and let them work independent to each other. The test explains the
way to control both stepper motor and DC motors at the same time.
Hardware Connection
Connect the stepper motor to STEPPER1 and DC motor to M4, shown as below.
(/wiki/index.php/File:DFR0508_FireBeetle_Covers-DC_Motor%26Stepper_Driver_7.png)
DC Motor & Stepper Drive Wiring Diagram
Sample Code
start(angle, speed, dir)
angle: set the rotation resolution.
The maximum resolution is 0.9°, which means the minimum rotate angle is 0.9°.
So that the motor won’t rotate if the resolution set to be 0.1° and only rotate to 0.9° if the resolution set to be 1°.
Min: 0°
Min: 0° (if the rotate angel set to be 0, the motor will keep rotating).
speed: set speed. The speed range is 0~1023. Set it to 0 and the rotate speed is 0r/min; set it to maximum 1023 and the rotate speed is 200r/min.
dir: set direction. dir=CW: rotate in C.W.(Clockwise); dir=CCW: rotate in anti-clockwise