Last active
September 7, 2017 19:44
-
-
Save SimoDax/dd846bac3e9113093db0c033523504f9 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
void spin() | |
{ | |
for(t = 0; t < 3; t++){ //3 = 10 min / (2 * 4096 * 8 * DELAY) = number of loops | |
for(int j = 0; j < 4096; j++){ | |
for(i = 0; i < 8; i++){ //single full-step cycle | |
PORTB = lookup[i]; | |
_delay_ms(DELAY); | |
} | |
} | |
for(int j = 0; j < 4096; j++){ | |
for(i = 0; i < 8; i++){ //single full-step cycle | |
PORTB = lookup[7-i]; | |
_delay_ms(DELAY); | |
} | |
} | |
} | |
PORTB = 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment