public class SRF02DistanceSensorI2C extends DistanceSensorBase
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ADDRESS |
coordinates, lastDistanceTimestamp
listeners
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, removeListener
addListener, removeAllListeners, removeListener
clearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTag
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
removeAllListeners
clearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTag
public 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 chipIOException
I2CFactory.UnsupportedBusNumberException
public double getValue()
public void setNewAddress(int newAddress) throws IOException
IOException
Copyright © 2012–2016 Pi4J. All rights reserved.