Skip to content

Instantly share code, notes, and snippets.

@tagroup tagroup/stepper.sh

Last active Dec 16, 2015
Embed
What would you like to do?
GPIO Stepper Motor Code for Raspberry Pi
#!/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
You can’t perform that action at this time.