Package dev.rablet.scd41.model
Class SCD41Data
java.lang.Object
dev.rablet.scd41.model.SCD41Data
Stores the temperature, humidity, and co2 information retrieved from a
SCD41 sensor
-
Constructor Summary
ConstructorsConstructorDescriptionSCD41Data(double temperature, double humidity, int co2) Creates an instance of BME280Data for storing data from a BME280 sensor -
Method Summary
Modifier and TypeMethodDescriptionintgetCo2()Get the CO2 measurementdoubleGet the relative humiditydoubleGets the temperature in CelsiusvoidsetCo2(int co2) Set the CO2 measurementvoidsetHumidity(double humidity) Set the relative humidityvoidsetTemperature(double temperature) Set the temperature in CelsiustoString()
-
Constructor Details
-
SCD41Data
public SCD41Data(double temperature, double humidity, int co2) Creates an instance of BME280Data for storing data from a BME280 sensor- Parameters:
temperature- the temperature in celsiushumidity- the relative humidityco2- the co2 concentration
-
-
Method Details
-
getTemperature
public double getTemperature()Gets the temperature in Celsius- Returns:
- double the temperature
-
setTemperature
public void setTemperature(double temperature) Set the temperature in Celsius- Parameters:
temperature- the temperature in Celsius
-
getHumidity
public double getHumidity()Get the relative humidity- Returns:
- double the relative humidity
-
setHumidity
public void setHumidity(double humidity) Set the relative humidity- Parameters:
humidity- the humidity to set
-
getCo2
public int getCo2()Get the CO2 measurement- Returns:
- int the CO2
-
setCo2
public void setCo2(int co2) Set the CO2 measurement- Parameters:
co2- the CO2 to set
-
toString
-