|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--cork.device.AbstractDevice
|
+--cork.net.i2c.AbstractI2CDevice
|
+--cork.module.devantech.SRF08
Software driver for the Devontech SRF08 Range Finder.
| Field Summary | |
static int |
ADDRESS_E0
This is the DEFAULT SHIPPING ADDRESS. |
static int |
ADDRESS_E2
Possible address for the SRF08 |
static int |
ADDRESS_E4
Possible address for the SRF08 |
static int |
ADDRESS_E6
Possible address for the SRF08 |
static int |
ADDRESS_E8
Possible address for the SRF08 |
static int |
ADDRESS_EA
Possible address for the SRF08 |
static int |
ADDRESS_EC
Possible address for the SRF08 |
static int |
ADDRESS_EE
Possible address for the SRF08 |
static int |
ADDRESS_F0
Possible address for the SRF08 |
static int |
ADDRESS_F2
Possible address for the SRF08 |
static int |
ADDRESS_F4
Possible address for the SRF08 |
static int |
ADDRESS_F6
Possible address for the SRF08 |
static int |
ADDRESS_F8
Possible address for the SRF08 |
static int |
ADDRESS_FA
Possible address for the SRF08 |
static int |
ADDRESS_FC
Possible address for the SRF08 |
static int |
ADDRESS_FE
Possible address for the SRF08 |
static int |
ADDRESS_GENERAL_BROADCAST
General broadcast address for all SRF08's on the bus. |
static int |
COMMAND_ANN_IN_CENTIMETERS
Possible range units for the SRF08 |
static int |
COMMAND_ANN_IN_INCHES
Possible range units for the SRF08 |
static int |
COMMAND_ANN_IN_MICROSECONDS
Possible range units for the SRF08 |
static int |
COMMAND_RANGE_IN_CENTIMETERS
Possible range units for the SRF08 |
static int |
COMMAND_RANGE_IN_INCHES
Possible range units for the SRF08 |
static int |
COMMAND_RANGE_IN_MICROSECONDS
Possible range units for the SRF08 |
| Constructor Summary | |
SRF08(int address)
Constructor for the SRF08 object |
|
| Method Summary | |
java.lang.String |
getDeviceDestription()
Gets the destription attribute of the Device object |
java.lang.String |
getDeviceName()
Gets the name attribute of the Device object |
I2CDevice |
getI2CDevice()
This must be implemented by all I2C devices, and must return it's own instance. |
int |
getLightLevel()
Gets the light level that the SRF08 detected. |
int[] |
getRange(int count)
Gets the range of the last ping. |
int |
getSoftwareRevision()
Gets the softwareRevision attribute of the SRF08 object |
void |
ping(int scale)
Causes the SRF08 to ping. |
| Methods inherited from class cork.net.i2c.AbstractI2CDevice |
capture, destroy, getBusMaster, getDeviceAddress, isCaptured, read, release, start, stop, tick, write |
| Methods inherited from class cork.device.AbstractDevice |
addEventListener, removeEventListener, sendDeviceEvent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ADDRESS_GENERAL_BROADCAST
public static final int ADDRESS_E0
public static final int ADDRESS_E2
public static final int ADDRESS_E4
public static final int ADDRESS_E6
public static final int ADDRESS_E8
public static final int ADDRESS_EA
public static final int ADDRESS_EC
public static final int ADDRESS_EE
public static final int ADDRESS_F0
public static final int ADDRESS_F2
public static final int ADDRESS_F4
public static final int ADDRESS_F6
public static final int ADDRESS_F8
public static final int ADDRESS_FA
public static final int ADDRESS_FC
public static final int ADDRESS_FE
public static final int COMMAND_RANGE_IN_INCHES
public static final int COMMAND_RANGE_IN_CENTIMETERS
public static final int COMMAND_RANGE_IN_MICROSECONDS
public static final int COMMAND_ANN_IN_INCHES
public static final int COMMAND_ANN_IN_CENTIMETERS
public static final int COMMAND_ANN_IN_MICROSECONDS
| Constructor Detail |
public SRF08(int address)
address - int the address of this SRF08. use the default address if
you have not change it.| Method Detail |
public void ping(int scale)
throws I2CException
scale - one of the scale constants in this class.I2CException - Description of Exception
public int getSoftwareRevision()
throws I2CException
I2CException - Description of Exception
public int getLightLevel()
throws I2CException
I2CException - if there was an error getting the light level
public int[] getRange(int count)
throws I2CException
count - The number of objects in view, starting with the
closest object as index 0.I2CException - if there was a problem getting the range.public java.lang.String getDeviceName()
public java.lang.String getDeviceDestription()
public I2CDevice getI2CDevice()
getI2CDevice in class AbstractI2CDevice
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||