Package com.diozero.devices.sandpit
Class VL6180
java.lang.Object
com.diozero.devices.sandpit.VL6180
- All Implemented Interfaces:
DistanceSensorInterface
,SensorInterface
,Closeable
,AutoCloseable
public class VL6180 extends Object implements DistanceSensorInterface
Datasheet: https://www.st.com/resource/en/datasheet/vl6180.pdf
-
Constructor Summary
Constructors Constructor Description VL6180()
-
Method Summary
Modifier and Type Method Description void
close()
float
getDistanceCm()
-
Constructor Details
-
VL6180
public VL6180()
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceSensorInterface
-
getDistanceCm
- Specified by:
getDistanceCm
in interfaceDistanceSensorInterface
- Returns:
- distance in cm
- Throws:
RuntimeIOException
-