Skip to content

Instantly share code, notes, and snippets.

@SimoDax
Last active September 7, 2017 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SimoDax/dd846bac3e9113093db0c033523504f9 to your computer and use it in GitHub Desktop.
Save SimoDax/dd846bac3e9113093db0c033523504f9 to your computer and use it in GitHub Desktop.
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