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, setStepsPerRevolution
forward, forward, isState, isStopped, reverse, reverse, stop
clearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTag
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forward, forward, isState, isStopped, reverse, reverse, stop
clearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTag
public 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 StepperMotor
step
in class StepperMotorBase
Copyright © 2012–2014 Pi4J. All rights reserved.