Created
October 24, 2012 03:51
-
-
Save eliperelman/3943616 to your computer and use it in GitHub Desktop.
Barn Door Tracker - Arduino
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
#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