Created
September 24, 2017 19:40
-
-
Save anonymous/f556f387d90c6a5bbebaa4b57aebbc00 to your computer and use it in GitHub Desktop.
Stepper Motor
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
int x=800; | |
void setup() { | |
pinMode(2, OUTPUT); | |
pinMode(3, OUTPUT); | |
digitalWrite(2, LOW); | |
digitalWrite(3, LOW); | |
} | |
void loop() { | |
for(int j=0; j<3000; j++) { | |
for(int i=0; i<5; i++) { | |
digitalWrite(2, HIGH); | |
delayMicroseconds(x); | |
digitalWrite(2, LOW); | |
// delayMicroseconds(x); | |
} | |
if(x>85) x--; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment