public class SRF02DistanceSensorI2C extends DistanceSensorBase
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_ADDRESS |
coordinates, lastDistanceTimestamplisteners| Constructor and Description |
|---|
SRF02DistanceSensorI2C(int i2c_bus_number,
int device_address)
default constructor
|
| Modifier and Type | Method and Description |
|---|---|
double |
getValue() |
void |
setNewAddress(int newAddress) |
addCalibrationCoordinate, addListener, getDistance, getDistance, getLastDistanceTimestamp, isDistance, isDistanceInRange, isValue, isValueInRange, notifyListeners, removeListeneraddListener, removeAllListeners, removeListenerclearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTagclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitremoveAllListenersclearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTagpublic static final int DEFAULT_ADDRESS
public SRF02DistanceSensorI2C(int i2c_bus_number,
int device_address)
throws I2CFactory.UnsupportedBusNumberException,
IOException
i2c_bus_number - the I2C bus that the chip is connected todevice_address - the I2C device address of the chipIOExceptionI2CFactory.UnsupportedBusNumberExceptionpublic double getValue()
public void setNewAddress(int newAddress)
throws IOException
IOExceptionCopyright © 2012–2019 Pi4J. All rights reserved.