Last active
December 16, 2015 18:09
-
-
Save tagroup/5475341 to your computer and use it in GitHub Desktop.
GPIO Stepper Motor Code for Raspberry Pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
gpio mode 0 out && gpio mode 1 out && gpio mode 2 out && gpio mode 3 out | |
gpio write 0 0 && gpio write 1 0 && gpio write 2 0 && gpio write 3 0 | |
while true | |
do gpio write 0 1 && gpio write 3 1 | |
gpio write 3 0 && gpio write 1 1 | |
gpio write 0 0 && gpio write 2 1 | |
gpio write 1 0 && gpio write 3 1 | |
gpio write 2 0 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment