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;
Instantiates an MAX44000 object
- Parameters
-
bus | Number of the used bus |
devAddr | Address of the used I2C device |
MAX44000 object destructor; basically, it closes the I2C connection.
uint16_t getProximity |
( |
| ) |
|
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_t 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:
- /var/lib/jenkins/workspace/upm-doc-stable/src/max44000/max44000.h
- /var/lib/jenkins/workspace/upm-doc-stable/src/max44000/max44000.cxx