MetaWear C++ API
0.18.0
C++ implementation of the MetaWear protocol
|
Communicates with the TSL2671 proximity detector. More...
#include "sensor_common.h"
Go to the source code of this file.
Enumerations | |
enum | MblMwProximityTsl2671Channel { MBL_MW_PROXIMITY_TSL2671_CHANNEL_0 = 1, MBL_MW_PROXIMITY_TSL2671_CHANNEL_1, MBL_MW_PROXIMITY_TSL2671_CHANNEL_BOTH } |
Photodiodes the detector should use for proximity detection. More... | |
enum | MblMwProximityTsl2671Current { MBL_MW_PROXIMITY_TSL2671_CURRENT_100mA = 0, MBL_MW_PROXIMITY_TSL2671_CURRENT_50mA, MBL_MW_PROXIMITY_TSL2671_CURRENT_25mA, MBL_MW_PROXIMITY_TSL2671_CURRENT_12_5mA } |
Amount of current driving the IR transmitter. | |
Functions | |
METAWEAR_API MblMwDataSignal * | mbl_mw_proximity_tsl2671_get_adc_data_signal (const MblMwMetaWearBoard *board) |
Retrieves the data signal representing ADC values for the light's colors. More... | |
METAWEAR_API void | mbl_mw_proximity_tsl2671_set_integration_time (MblMwMetaWearBoard *board, float time) |
Sets the integration time. More... | |
METAWEAR_API void | mbl_mw_proximity_tsl2671_set_n_pulses (MblMwMetaWearBoard *board, uint8_t n_pulses) |
Sets the pulse count. More... | |
METAWEAR_API void | mbl_mw_proximity_tsl2671_set_receiver_channel (MblMwMetaWearBoard *board, MblMwProximityTsl2671Channel channel) |
Sets the photodiode that responds to light. More... | |
METAWEAR_API void | mbl_mw_proximity_tsl2671_set_transmitter_current (MblMwMetaWearBoard *board, MblMwProximityTsl2671Current current) |
Sets the current driving the light transmitter. More... | |
METAWEAR_API void | mbl_mw_proximity_tsl2671_write_config (const MblMwMetaWearBoard *board) |
Writes the configuration to the sensor. More... | |
Communicates with the TSL2671 proximity detector.
Photodiodes the detector should use for proximity detection.
METAWEAR_API MblMwDataSignal* mbl_mw_proximity_tsl2671_get_adc_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Retrieves the data signal representing ADC values for the light's colors.
board | Board the sensor resides on |
METAWEAR_API void mbl_mw_proximity_tsl2671_set_integration_time | ( | MblMwMetaWearBoard * | board, |
float | time | ||
) |
Sets the integration time.
board | Board to modify |
time | New integration time to use, between [2.72, 693.6] milliseconds |
METAWEAR_API void mbl_mw_proximity_tsl2671_set_n_pulses | ( | MblMwMetaWearBoard * | board, |
uint8_t | n_pulses | ||
) |
Sets the pulse count.
Sensitivity increase by the sqrt of pulse count.
board | Board to modify |
n_pulses | Number of pulses to use for proximity detection, between [1, 255] |
METAWEAR_API void mbl_mw_proximity_tsl2671_set_receiver_channel | ( | MblMwMetaWearBoard * | board, |
MblMwProximityTsl2671Channel | channel | ||
) |
Sets the photodiode that responds to light.
board | Board to modify |
channel | New receiver channel to use |
METAWEAR_API void mbl_mw_proximity_tsl2671_set_transmitter_current | ( | MblMwMetaWearBoard * | board, |
MblMwProximityTsl2671Current | current | ||
) |
Sets the current driving the light transmitter.
For boards powered by the CR2032 battery, it is recommended that the current be 25mA or less.
board | Board to modify |
current | New driver current to use |
METAWEAR_API void mbl_mw_proximity_tsl2671_write_config | ( | const MblMwMetaWearBoard * | board | ) |
Writes the configuration to the sensor.
board | Board the sensor resides on |