Controlling two 28BYJ-48 Stepper Motors with Raspberry Pi

I’ve taken some code written by Stephen C Phillips and added/modified a few lines so its possible to run two motors at once, even with different directions.

run the code with the following command:

10 stands for rpm (rounds per minute) and +90 -90 as the amount of degrees each motor should turn. I figured out that, with this code and motors the max RPM is around 16, which results in a speed of 16 * 2 * Pi * Radius of your Wheel in cm / m.

This code only demonstrates how to turn the motors with a certain speed and degree. Its not made for rotating wheels yet..

Have fun experimenting 🙂

Leave a Reply