Skip to content

Instantly share code, notes, and snippets.

@tagroup
Last active December 16, 2015 18:09
Show Gist options
  • Save tagroup/5475341 to your computer and use it in GitHub Desktop.
Save tagroup/5475341 to your computer and use it in GitHub Desktop.
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