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
/* | |
Focus Pulling:Free Mode, Automatically triggered Rec Mode, IO Mode,Playback Mode. | |
Double Click Free Switch sets lens limits. pSwitch limit in, IOSwitch limit out. | |
In IO Mode:control the speed of Playback with the dial. | |
Adi Soffer | |
11.7.12 | |
*/ |
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
// Movement of Optical encoder is translated to moving stepper | |
// THIS IS A WORKING VERSION 22.1.13 | |
#include <AccelStepper.h> | |
//encoder/motor/driver setup | |
int easyDriverMicroSteps = 2; | |
int rotaryEncoderSteps = 75; | |
int motorStepsPerRev = 200; |
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
// Movement of Optical encoder is translated to moving stepper | |
// THIS IS A WORKING VERSION 22.1.13 | |
#include <OneButton.h> | |
//these pins can not be changed 2/3 are special pins |
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
// Movement of Optical encoder is translated to moving stepper | |
#include <AccelStepper.h> | |
//encoder/motor/driver setup | |
int easyDriverMicroSteps = 2; | |
int rotaryEncoderSteps = 75; | |
int motorStepsPerRev = 200; | |
int MinPulseWidth = 50; //too low and the motor will stall, too high and it will slow it down |
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 <OneButton.h> | |
// Movement of Optical encoder is translated to moving stepper | |
// | |
//these pins can not be changed 2/3 are special pins | |
int encoderPin1 = 2; | |
int encoderPin2 = 3; |
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
// Movement of Optical encoder is translated to moving stepper | |
#include <AccelStepper.h> | |
//encoder/motor/driver setup | |
int easyDriverMicroSteps = 2; | |
int rotaryEncoderSteps = 75; | |
int motorStepsPerRev = 200; | |
int MinPulseWidth = 50; //too low and the motor will stall, too high and it will slow it down |
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
// Movement of Optical encoder is translated to moving stepper | |
#include <AccelStepper.h> | |
//encoder/motor/driver setup | |
int easyDriverMicroSteps = 2; | |
int rotaryEncoderSteps = 75; | |
int motorStepsPerRev = 200; | |
int MinPulseWidth = 50; //too low and the motor will stall, too high and it will slow it down |
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 <OneButton.h> | |
// Movement of Optical encoder is translated to moving stepper | |
// | |
//these pins can not be changed 2/3 are special pins | |
int encoderPin1 = 2; | |
int encoderPin2 = 3; |
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
/******************************************************** | |
* Optical Encoder + Stepper Motor = Smart Follow Focus * | |
* Realtime, Lens Calibration, Variable Speed * | |
* Adi Soffer 2.9.12 * | |
*******************************************************/ | |
#include <AccelStepper.h> | |
#include <OneButton.h> |
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 <AccelStepper.h> | |
#include <OneButton.h> | |
//encoder/motor/driver setup | |
int easyDriverMicroSteps = 1; //I think this is 4 or 8 | |
int rotaryEncoderSteps = 75; //setps per rev on your encoder | |
int motorStepsPerRev = 200; //this is right - steps per rev on the motor | |
int MinPulseWidth = 50; //too low and the motor will stall, too high and it will slow it down | |
//Encoder pins (cannot be changed 2/3 are special pins) |
NewerOlder