Created
November 15, 2018 14:42
-
-
Save giljr/4d52810d469acd5711a32b036c84fbee 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
// Full Step | |
#define stepper PORTB | |
#define waiting_time 500 | |
void setup() { | |
for (int z = 8; z < 12; z++) { // FULL STEP DRIVE | |
pinMode(z, OUTPUT); // pins 8,9,10,11 output for driving the motor | |
} | |
} | |
void loop() { | |
stepper = 0B0011; // 0x03; | |
delay(waiting_time); | |
stepper = 0B0110; // 0x06; | |
delay(waiting_time); | |
stepper = 0B1100; // 0x0C; | |
delay(waiting_time); | |
stepper = 0B1001; // 0x09; | |
delay(waiting_time); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment