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
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 Details
-
LM73
-
-
Method Details
-
close
public void close()Description copied from interface:DeviceInterface
Close this device- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceDeviceInterface
-
getConfiguration
-
getResolution
-
setResolution
-
setPower
public void setPower(boolean on) -
isDataAvailable
public boolean isDataAvailable() -
getTemperature
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
-