Skip to content

Instantly share code, notes, and snippets.

@eliperelman
Created October 24, 2012 03:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliperelman/3943616 to your computer and use it in GitHub Desktop.
Save eliperelman/3943616 to your computer and use it in GitHub Desktop.
Barn Door Tracker - Arduino
#include <AFMotor.h>
const float rpm = 6.999999;
const int stepsPerRevolution = 200;
const int shieldPort = 1;
AF_Stepper motor(stepsPerRevolution, shieldPort);
void setup() {
// set up Serial library at 9600 bps
Serial.begin(9600);
motor.setSpeed(rpm);
delay(1000);
}
void loop() {
// Using DOUBLE setting for greater torque
motor.step(1, FORWARD, DOUBLE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment