|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.bluemelon.bluesense.Device
org.bluemelon.bluesense.StepperDevice
public class StepperDevice
Interface to the dc stepper module. This module can be used to control the speed of 2 dc steppers.
| Field Summary | |
|---|---|
static int |
PROXY_ID
|
static java.lang.String |
PROXY_TITLE
|
static int[] |
SUPPORTS
|
| Constructor Summary | |
|---|---|
StepperDevice(Master master,
int deviceId)
Creates a 'software' dc stepper device proxy with a given id. |
|
| Method Summary | |
|---|---|
boolean |
getConfigurationAutoStop()
|
int |
getConfigurationCurrent()
|
boolean |
getConfigurationFastDecay()
|
boolean |
getConfigurationHalfStep()
|
boolean |
getConfigurationWaveDrive()
|
int |
getCurrentSpeed()
Returns the current set speed of a specific stepper. |
int |
getCurrentStepCount()
|
boolean |
getPendingConfigurationAutoStop()
|
int |
getPendingConfigurationCurrent()
|
boolean |
getPendingConfigurationFastDecay()
|
boolean |
getPendingConfigurationHalfStep()
|
boolean |
getPendingConfigurationWaveDrive()
|
int |
getPendingSpeed()
Returns the speed of a specific stepper, which is currently underway to the device |
boolean |
getRequestGetConfigurationDone()
|
boolean |
getRequestSetConfigurationDone()
Checks if the configuration request is finished |
boolean |
getRequestSetSpeedDone()
Checks if the speed set request is finished |
long |
getTimeOutUs()
Returns the current set time out delay. |
void |
requestGetConfiguration()
|
void |
requestGetState()
|
void |
requestSetConfiguration(int current,
boolean autoStop,
boolean halfStep,
boolean waveDrive,
boolean fastDecay)
Requests setting a new configuration |
void |
requestSetStepCount(int speed,
int count)
Requests the stepper device to set one of its steppers to a new speed |
void |
setTimeOutUs(int timeOutUs)
Sets the time out value which is used to check if a request was acknowledged in the set time. |
| Methods inherited from class org.bluemelon.bluesense.Device |
|---|
addDeviceEventListener, detect, getFirmwareVersion, getId, getType, getTypeName, isAccessible, removeDeviceEventListener |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROXY_TITLE
public static final int PROXY_ID
public static final int[] SUPPORTS
| Constructor Detail |
|---|
public StepperDevice(Master master,
int deviceId)
master - deviceId - | Method Detail |
|---|
public void requestSetStepCount(int speed,
int count)
speed - an uint8_t representing the new speed of the stepper.
Note that each speed is a value between -128 and 127. -128 to -1 represent a speed left, 0 stand still and 1 to 127 a speed right,
the actual physical speed depends on the specifications of the connected stepper.count - if this value is not -1, the stepper motor will step
the given number of 'count' steps before stoppingpublic void requestGetState()
public int getCurrentStepCount()
public int getPendingSpeed()
public boolean getRequestSetSpeedDone()
public int getCurrentSpeed()
port - one of the port pin values. @see bsStepper_p1
public void requestSetConfiguration(int current,
boolean autoStop,
boolean halfStep,
boolean waveDrive,
boolean fastDecay)
current - in mA between 0 and 1500 mA. Warning: a wrong value can damage your motor.autoStop - stops the motor if a connected limit switch is closedhalfStep - true --> half steps, false --> full stepswaveDrive - true --> wave Drive on (noise reduction)fastDecay - true --> fast decay mode, false --> normal decay mode (noise reduction)public void requestGetConfiguration()
public boolean getRequestSetConfigurationDone()
public boolean getRequestGetConfigurationDone()
public int getPendingConfigurationCurrent()
public boolean getPendingConfigurationAutoStop()
public boolean getPendingConfigurationHalfStep()
public boolean getPendingConfigurationWaveDrive()
public boolean getPendingConfigurationFastDecay()
public int getConfigurationCurrent()
public boolean getConfigurationAutoStop()
public boolean getConfigurationHalfStep()
public boolean getConfigurationWaveDrive()
public boolean getConfigurationFastDecay()
public long getTimeOutUs()
public void setTimeOutUs(int timeOutUs)
timeOutUs - the value in microseconds which is the maximum duraion between a request and its answer.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||