Humidistat
Arduino firmware for a humidistat (humidity controller)
Loading...
Searching...
No Matches
SHTHumiditySensor.cpp
Go to the documentation of this file.
1
#include "
SHTHumiditySensor.h
"
2
3
SHTHumiditySensor::SHTHumiditySensor
(SHTSensor *sht) : sht(*sht) {}
4
5
double
SHTHumiditySensor::getHumidity
()
const
{
6
return
h
;
7
}
8
9
double
SHTHumiditySensor::getTemperature
()
const
{
10
return
t
;
11
}
12
13
void
SHTHumiditySensor::begin
() {
14
Wire.begin();
15
sht
.init();
16
}
17
18
void
SHTHumiditySensor::readSample
() {
19
sht
.readSample();
20
t
=
sht
.getTemperature();
21
h
=
sht
.getHumidity();
22
}
SHTHumiditySensor.h
SHTHumiditySensor::SHTHumiditySensor
SHTHumiditySensor(SHTSensor *sht)
Definition
SHTHumiditySensor.cpp:3
SHTHumiditySensor::h
double h
Definition
SHTHumiditySensor.h:13
SHTHumiditySensor::t
double t
Definition
SHTHumiditySensor.h:13
SHTHumiditySensor::getTemperature
double getTemperature() const
Definition
SHTHumiditySensor.cpp:9
SHTHumiditySensor::getHumidity
double getHumidity() const
Definition
SHTHumiditySensor.cpp:5
SHTHumiditySensor::sht
SHTSensor & sht
Definition
SHTHumiditySensor.h:11
SHTHumiditySensor::readSample
void readSample()
Definition
SHTHumiditySensor.cpp:18
SHTHumiditySensor::begin
void begin()
Definition
SHTHumiditySensor.cpp:13
src
sensor
SHTHumiditySensor.cpp
Generated by
1.12.0