รถเข็นของคุณว่างเปล่า!
Thanks for reading this tutorial. If you have any technical inquiry, please post at Cytron Technical Forum.
A stepper motor is a brushless DC electric motor that divides a full rotation into a number of equal steps. The motor’s position can then be commanded to move and hold at one of these steps without any position sensor for feedback (an open-loop controller). Besides controlling DC brush motor, we can use Maker Drive to control stepper motor. So, in this I will show you how to control stepper motor using Maker Drive and Raspberry Pi.
Tutorial you may need to read first:
This video will show you how to control stepper motor using Maker Drive and Raspberry Pi.
Untuk versi bahasa Melayu, sila rujuk video diatas.
Below is the list of items used in the video
Wiring connection table
Raspberry Pi | Maker Drive | Stepper Motor | Battery |
GPIO 17 | Pin M1A | ||
GPIO 18 | Pin M1B | ||
5V | 5Vo | ||
GND | GND | ||
GPIO 27 | Pin M2A | ||
GPIO 22 | Pin M2B | ||
Terminal M1A | Yellow | ||
Terminal M1B | White | ||
VB+ | Positive | ||
VB- | Negative | ||
Terminal M2A | Red | ||
Terminal M2B | Black |
This is sample code used in the video. Save the second code as PigpioStepperMotor. Please run pigpio daemon (sudo pigpiod) before run the program.
[gist https://gist.github.com/IdrisCytron/af04c2e4d4f444e56d0aaf012100fa22/]
References:
Thanks for reading this tutorial. If you have any technical inquiry, please post at Cytron Technical Forum.