Treehopper C++ API
Bmp280.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Libraries/Treehopper.Libraries.h
"
4
#include "
Libraries/Sensors/Pressure/PressureSensor.h
"
5
#include "
Libraries/Sensors/Temperature/TemperatureSensor.h
"
6
#include "
Libraries/Sensors/Pressure/Bmp280Registers.h
"
7
#include "
I2c.h
"
8
#include <memory>
9
10
using namespace
Treehopper::Libraries
;
11
using namespace
Treehopper::Libraries::Sensors::Temperature
;
12
using namespace
Treehopper::Libraries::Sensors::Pressure
;
13
14
namespace
Treehopper
{
15
namespace
Libraries {
16
namespace
Sensors {
17
namespace
Pressure {
18
class
Bmp280Registers;
19
20
class
LIBRARIES_API
Bmp280
:
public
PressureSensor
,
public
TemperatureSensor
{
21
public
:
22
Bmp280
(
I2c
&i2c,
bool
sdoPin =
false
,
int
rate = 100);
23
24
~
Bmp280
();
25
26
void
update();
27
28
double
altitude();
29
30
double
referencePressure
;
31
protected
:
32
double
tFine;
33
Bmp280Registers registers;
34
private
:
35
SMBusDevice
dev;
36
37
double
altitudeFromPressure(
double
temperature,
double
pressure);
38
39
double
_altitude;
40
};
41
}
42
}
43
}
44
}
Treehopper::Libraries
Definition:
Dm632.h:9
Treehopper::I2c
Base I2c interface.
Definition:
I2c.h:10
Treehopper::SMBusDevice
Definition:
SMBusDevice.h:7
I2c.h
Treehopper::Libraries::Sensors::Temperature
Definition:
Lm75.h:12
Bmp280Registers.h
Treehopper::Libraries::Sensors::Pressure::Bmp280::referencePressure
double referencePressure
Definition:
Bmp280.h:30
Treehopper::Libraries::Sensors::Pressure
Definition:
Bme280.h:13
TemperatureSensor.h
LIBRARIES_API
#define LIBRARIES_API
Definition:
Treehopper.Libraries.h:17
Treehopper
Definition:
AdcPin.h:3
Treehopper::Libraries::Sensors::Pressure::PressureSensor
Definition:
PressureSensor.h:12
Treehopper::Libraries::Sensors::Temperature::TemperatureSensor
Definition:
TemperatureSensor.h:12
Treehopper::Libraries::Sensors::Pressure::Bmp280
Definition:
Bmp280.h:20
Treehopper.Libraries.h
PressureSensor.h
C++
API
inc
Libraries
Sensors
Pressure
Bmp280.h