public class TemperatureSensor extends I2CSensor
Constructor and Description |
---|
TemperatureSensor()
Creates a sensor instance connected to port S1.
|
TemperatureSensor(SensorPort port)
Creates a sensor instance connected to the given port.
|
Modifier and Type | Method and Description |
---|---|
double |
getTemperature()
Returns the temperature in degrees Celsius rounded to two decimals.
|
getData, getData, getLejosI2CSensor, getProductID, getVersion, sendData, sendData, sendData
getLejosPort
public TemperatureSensor(SensorPort port)
port
- the port where the sensor is plugged-inpublic TemperatureSensor()