public class TMP36 extends AnalogInputDevice implements TemperatureSensorInterface
listeners
pinNumber
Constructor and Description |
---|
TMP36(AnalogInputDeviceFactoryInterface deviceFactory,
int pinNumber,
float vRef,
float tempOffset) |
Modifier and Type | Method and Description |
---|---|
float |
getScaledValue()
Get the scaled value in the range 0..range (if unsigned) or -range..range (if signed)
|
float |
getTemperature()
Get temperature in degrees celsius
|
addListener, addListener, close, disableListener, enableListener, getUnscaledValue, run
addListener, removeAllListeners, removeListener, valueChanged
getPinNumber
public TMP36(AnalogInputDeviceFactoryInterface deviceFactory, int pinNumber, float vRef, float tempOffset) throws RuntimeIOException
RuntimeIOException
public float getScaledValue() throws RuntimeIOException
AnalogInputDevice
getScaledValue
in class AnalogInputDevice
RuntimeIOException
- if there was an I/O errorpublic float getTemperature() throws RuntimeIOException
TemperatureSensorInterface
getTemperature
in interface TemperatureSensorInterface
RuntimeIOException
- if an I/O error occursCopyright © 2016 mattjlewis. All rights reserved.