Crate veml7700

Source
Expand description

This is a platform agnostic Rust driver for the Veml7700 and VEML7700 high-accuracy ambient light sensors using the embedded-hal traits.

This driver allows you to:

§The device

Vishay’sVEML7700 are high accuracy ambient light digital 16-bit resolution sensor in a miniature transparent package. It includes a high sensitive photodiode, a low noise amplifier, a 16-bit A/D converter and support an easy to use I2C bus communication interface and additional interrupt feature. The ambient light result is as digital value available.

Datasheet: VEML7700

Application Note:

§Usage examples (see also examples folder)

To use this driver, import this crate and an embedded_hal implementation, then instantiate the appropriate device.

VEML7700 expose interface over I2C.

Structs§

InterruptStatus
Interrupt status
Veml7700
VEML7700 device driver.

Enums§

Error
All possible errors in this crate
FaultCount
Fault count
Gain
Gain
IntegrationTime
Integration time
PowerSavingMode
Power-saving mode

Functions§

calculate_raw_threshold_value
Calculate raw value for threshold applying compensation if necessary.
convert_raw_als_to_lux
Calculate lux value for a raw ALS measurement.