public class GpioStepperMotorComponent extends StepperMotorBase
stepIntervalMilliseconds, stepIntervalNanoseconds, stepSequence, stepsPerRevolution| Constructor and Description |
|---|
GpioStepperMotorComponent(GpioPinDigitalOutput[] pins)
default constructor; using this constructor assumes that:
(1) a pin state of HIGH is MOTOR STEP ON
(2) a pin state of LOW is MOTOR STEP OFF
|
GpioStepperMotorComponent(GpioPinDigitalOutput[] pins,
PinState onState,
PinState offState)
using this constructor requires that the consumer
define the STEP ON and STEP OFF pin states
|
| Modifier and Type | Method and Description |
|---|---|
MotorState |
getState()
Return the current motor state
|
void |
setState(MotorState state)
change the current stepper motor state
|
void |
step(long steps) |
getStepSequence, getStepsPerRevolution, rotate, setStepInterval, setStepInterval, setStepSequence, setStepsPerRevolutionforward, forward, isState, isStopped, reverse, reverse, stopclearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTagclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforward, forward, isState, isStopped, reverse, reverse, stopclearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTagpublic GpioStepperMotorComponent(GpioPinDigitalOutput[] pins, PinState onState, PinState offState)
pins - GPIO digital output pins for each controller in the stepper motoronState - pin state to set when MOTOR STEP is ONoffState - pin state to set when MOTOR STEP is OFFpublic GpioStepperMotorComponent(GpioPinDigitalOutput[] pins)
pins - GPIO digital output pins for each controller in the stepper motorpublic MotorState getState()
public void setState(MotorState state)
public void step(long steps)
step in interface StepperMotorstep in class StepperMotorBaseCopyright © 2012-2013 Pi4J. All Rights Reserved.