Treehopper C++ API
Vcnl4010.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
Libraries/Sensors/ProximitySensor.h
>
4
#include <
I2c.h
>
5
#include <
SMBusDevice.h
>
6
#include "
Libraries/Treehopper.Libraries.h
"
7
#include "
AmbientLightSensor.h
"
8
#include "
Vcnl4010Registers.h
"
9
10
namespace
Treehopper
{
11
namespace
Libraries {
12
namespace
Sensors {
13
namespace
Optical {
14
class
LIBRARIES_API
Vcnl4010
:
public
virtual
ProximitySensor
,
public
virtual
AmbientLightSensor
{
15
public
:
16
Vcnl4010
(
I2c
&i2c,
int
rate = 100);
17
18
void
update();
19
20
double
rawProximity();
21
22
private
:
23
SMBusDevice
dev;
24
Vcnl4010Registers registers;
25
double
_rawProximity;
26
};
27
}
28
}
29
}
30
}
AmbientLightSensor.h
Treehopper::I2c
Base I2c interface.
Definition:
I2c.h:10
Treehopper::SMBusDevice
Definition:
SMBusDevice.h:7
SMBusDevice.h
Treehopper::Libraries::Sensors::ProximitySensor
Definition:
ProximitySensor.h:11
I2c.h
ProximitySensor.h
Treehopper::Libraries::Sensors::Optical::AmbientLightSensor
Definition:
AmbientLightSensor.h:9
LIBRARIES_API
#define LIBRARIES_API
Definition:
Treehopper.Libraries.h:17
Vcnl4010Registers.h
Treehopper
Definition:
AdcPin.h:3
Treehopper::Libraries::Sensors::Optical::Vcnl4010
Definition:
Vcnl4010.h:14
Treehopper.Libraries.h
C++
API
inc
Libraries
Sensors
Optical
Vcnl4010.h