public class EasyDriver extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BACKWARD |
static int |
FORWARD |
static int |
FULL_STEP |
static int |
HALF_STEP |
static int |
ONE_EIGHTH_STEP |
static int |
ONE_FOURTH_STEP |
Constructor and Description |
---|
EasyDriver(int drivingMode,
Pin stepPin,
Pin dirPin,
Pin sleepPin,
Pin enablePin,
Pin ms1Pin,
Pin ms2Pin,
Pin resetPin) |
EasyDriver(Pin stepPin) |
EasyDriver(Pin stepPin,
Pin dirPin,
Pin sleepPin,
Pin enablePin,
Pin ms1Pin,
Pin ms2Pin,
Pin resetPin) |
Modifier and Type | Method and Description |
---|---|
void |
disable() |
void |
enable() |
static double |
getDegreesFromStep(int steps,
int drivingMode) |
static int |
getStepsFromDegrees(double degrees,
int drivingMode) |
void |
move(int steps,
int interval) |
void |
move(int distance,
int interval,
int drivingMode) |
void |
reset() |
void |
rotate(double degrees,
int interval) |
void |
rotate(double degrees,
int interval,
int drivingMode) |
void |
setDirection(int direction) |
void |
setDrivingMode(int drivingMode) |
void |
shutdown() |
void |
sleep() |
void |
wake() |
public static final int FORWARD
public static final int BACKWARD
public static final int FULL_STEP
public static final int HALF_STEP
public static final int ONE_FOURTH_STEP
public static final int ONE_EIGHTH_STEP
public EasyDriver(int drivingMode, Pin stepPin, Pin dirPin, Pin sleepPin, Pin enablePin, Pin ms1Pin, Pin ms2Pin, Pin resetPin)
public EasyDriver(Pin stepPin, Pin dirPin, Pin sleepPin, Pin enablePin, Pin ms1Pin, Pin ms2Pin, Pin resetPin)
public EasyDriver(Pin stepPin)
public void setDrivingMode(int drivingMode)
public void rotate(double degrees, int interval, int drivingMode) throws InterruptedException
InterruptedException
public void rotate(double degrees, int interval) throws InterruptedException
InterruptedException
public void move(int distance, int interval, int drivingMode) throws InterruptedException
InterruptedException
public void move(int steps, int interval) throws InterruptedException
InterruptedException
public void sleep()
public void wake()
public void reset()
public void enable()
public void disable()
public void shutdown()
public void setDirection(int direction)
public static double getDegreesFromStep(int steps, int drivingMode)
public static int getStepsFromDegrees(double degrees, int drivingMode)
Copyright © 2012–2016 Pi4J. All rights reserved.