Get the Code

Let's put this file right in your home directory for simplicity. The wget command makes things easy as this can be run from an internet connected Raspberry Pi.

$ wget https://raw.githubusercontent.com/adafruit/Adafruit_Learning_System_Guides/master/Raspberry_Pi_Stepper_Motors/Raspberry_Pi_Stepper_Motors.py

Running the Code

Confirm that the Pi connected to the Cobbler (or Cobbler Plus) and run the script.

The following command will start the program:

$ sudo python3 ./Raspberry_Pi_Stepper_Motors.py

Enter a delay (5 is a good value) and then a number of steps (512 is a full rotation).

Experiment reducing the delay to find the maximum speed of the motor.

This guide was first published on Jan 23, 2013. It was last updated on Jan 23, 2013.

This page (Configure and Test) was last updated on Jan 23, 2013.

Text editor powered by tinymce.