Package com.diozero.devices
Class W1ThermSensor
java.lang.Object
com.diozero.devices.W1ThermSensor
- All Implemented Interfaces:
DeviceInterface
,SensorInterface
,ThermometerInterface
,AutoCloseable
public class W1ThermSensor extends Object implements ThermometerInterface
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
W1ThermSensor.Type
-
Method Summary
Modifier and Type Method Description void
close()
Close this devicestatic List<W1ThermSensor>
getAvailableSensors()
static List<W1ThermSensor>
getAvailableSensors(String folder)
String
getSerialNumber()
float
getTemperature()
Get temperature in degrees celsiusW1ThermSensor.Type
getType()
-
Method Details
-
getAvailableSensors
-
getAvailableSensors
-
getTemperature
Get temperature in degrees celsius- Specified by:
getTemperature
in interfaceThermometerInterface
- Returns:
- Temperature (deg C)
- Throws:
RuntimeIOException
- if an I/O error occurs
-
getType
-
getSerialNumber
-
close
public void close()Description copied from interface:DeviceInterface
Close this device- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceDeviceInterface
-