Package com.diozero.devices
Class LM73
java.lang.Object
com.diozero.devices.LM73
- All Implemented Interfaces:
SensorInterface
,ThermometerInterface
,java.io.Closeable
,java.lang.AutoCloseable
public class LM73 extends java.lang.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()
LM73.Configuration
getConfiguration()
LM73.Resolution
getResolution()
float
getTemperature()
Get temperature in degrees celsiusboolean
isDataAvailable()
static void
main(java.lang.String[] args)
float
oneShotRead()
void
setPower(boolean on)
void
setResolution(LM73.Resolution resolution)
-
Constructor Details
-
Method Details
-
close
public void close()- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceSensorInterface
-
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
public static void main(java.lang.String[] args)
-