Created
August 23, 2019 15:57
-
-
Save samirsogay/1ea6efbb33ff64e55ed04c8b595d3822 to your computer and use it in GitHub Desktop.
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
// defines pins numbers | |
const int stepPin = 3; | |
const int dirPin = 4; | |
void setup() { | |
// Sets the two pins as Outputs | |
pinMode(stepPin,OUTPUT); | |
pinMode(dirPin,OUTPUT); | |
} | |
void loop() { | |
digitalWrite(dirPin,HIGH); // Enables the motor to move in a particular direction | |
digitalWrite(stepPin,HIGH); | |
delayMicroseconds(2000); | |
digitalWrite(stepPin,LOW); | |
delayMicroseconds(2000); | |
} |
You can set the dirPin as LOW
Hi Samir, Nice video,
Was wondering if you have diagram for the connections please.
Thanks,
Jag
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I WANT TO REVERSE