Created
November 7, 2019 18:37
-
-
Save freegroup/0c59a96f5eb3c778419c9f1955866461 to your computer and use it in GitHub Desktop.
This file contains 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
from gpiozero import LED | |
from time import sleep | |
step = LED(4) | |
dir = LED(3) | |
step = LED(17) | |
dir = LED(18) | |
wait = 0.000051 | |
while True: | |
dir.on() | |
sleep(0.5) | |
for i in range(13000): | |
step.on() | |
sleep(wait) | |
step.off() | |
sleep(wait) | |
sleep(0.5) | |
dir.off() | |
for i in range(13000): | |
step.on() | |
sleep(wait) | |
step.off() | |
sleep(wait) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment