Python codes for controlling a NEMA 17 stepper motor with a DRV8825 driver and Raspberry Pi computer
Full tutorial at: https://makersportal.com/blog/raspberry-pi-stepper-motor-control-with-nema-17
Buy a Stepper Motor Kit here: https://makersportal.com/shop/nema-17-stepper-motor-kit-17hs4023-drv8825-bridge
The NEMA 17 can be wired to the Raspberry Pi via the DRV8825 driver and GPIO pins:
The RpiMotorLib is used to control the motor, which can be installed via the following command:
pi@raspberrypi:~ $ sudo pip3 install rpimotorlib
Example output from nema17_test.py: