Package com.diozero.devices
Class LM73
- java.lang.Object
-
- com.diozero.devices.LM73
-
- All Implemented Interfaces:
DeviceInterface
,SensorInterface
,ThermometerInterface
,AutoCloseable
public class LM73 extends Object implements ThermometerInterface
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LM73.Configuration
static class
LM73.Resolution
-
Constructor Summary
Constructors Constructor Description LM73(int controller, LM73.Configuration config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close this deviceLM73.Configuration
getConfiguration()
LM73.Resolution
getResolution()
float
getTemperature()
Get temperature in degrees celsiusboolean
isDataAvailable()
static void
main(String[] args)
float
oneShotRead()
void
setPower(boolean on)
void
setResolution(LM73.Resolution resolution)
-
-
-
Constructor Detail
-
LM73
public LM73(int controller, LM73.Configuration config)
-
-
Method Detail
-
close
public void close()
Description copied from interface:DeviceInterface
Close this device- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceDeviceInterface
-
getConfiguration
public LM73.Configuration getConfiguration()
-
getResolution
public LM73.Resolution getResolution()
-
setResolution
public void setResolution(LM73.Resolution resolution)
-
setPower
public void setPower(boolean on)
-
isDataAvailable
public boolean isDataAvailable()
-
getTemperature
public float getTemperature() throws RuntimeIOException
Description copied from interface:ThermometerInterface
Get temperature in degrees celsius- Specified by:
getTemperature
in interfaceThermometerInterface
- Returns:
- Temperature (deg C)
- Throws:
RuntimeIOException
- if an I/O error occurs
-
oneShotRead
public float oneShotRead()
-
main
public static void main(String[] args)
-
-