API for the MAX44000 Ambient and Infrared Proximity Sensor.
More...
- ID: max44000
- Name: MAX44000 Proximity Sensor
- Category: light
- Manufacturer: maxim
- Connection: i2c
Maxim Integrated* MAX44000 is an ambient and infrared proximity sensor. This module was tested on the Maxim Integrated MAX44000PMB1 PMOD module from the analog PMOD kit.
std::cout <<
"proximity value = " << sensor->
getAmbient () << std::endl;
MAX44000 |
( |
int |
bus, |
|
|
int |
devAddr = ADDR |
|
) |
| |
Instantiates an MAX44000 object
- Parameters
-
bus | Number of the used bus |
devAddr | Address of the used I2C device |
uint16_t getProximity |
( |
| ) |
|
MAX44000 object destructor; basically, it closes the I2C connection. ~MAX44000 (); no need for the destructor - the I2c connection will be closed when m_i2cMaxControlCtx variable will be out of context Reads the proximity value from the sensor (based on ambient data).
Reads the ambient value from the sensor (based on ambient data).
Returns the name of the component
uint8_t i2cReadReg_8 |
( |
int |
reg | ) |
|
Reads a one-byte register
- Parameters
-
reg | Address of the register |
uint16_t i2cReadReg_16 |
( |
int |
reg | ) |
|
Reads a two-byte register
- Parameters
-
reg | Address of the register |
mraa::Result i2cWriteReg |
( |
uint8_t |
reg, |
|
|
uint8_t |
value |
|
) |
| |
Writes to a one-byte register
- Parameters
-
reg | Address of the register |
value | Byte to be written |
The documentation for this class was generated from the following files:
- /iotdk/jenkins/workspace/upm-doc-stable/src/max44000/max44000.h
- /iotdk/jenkins/workspace/upm-doc-stable/src/max44000/max44000.cxx