Rust VEML6040 RGBW Color Sensor Driver

This is a platform agnostic Rust driver for the VEML6040 RGBW color light

sensor, based on the embedded-hal traits.

This driver allows you to:

  • Enable/disable the sensor.
  • Set the integration time.
  • Set the measurement mode.
  • Trigger a measurement when on manual mode.
  • Read the red channel measurement.
  • Read the green channel measurement.
  • Read the blue channel measurement.
  • Read the white channel measurement.
  • Read measurement of all channels at once.

The device

VEML6040 color sensor senses red, green, blue, and white light and incorporates photodiodes, amplifiers, and analog / digital circuits into a single chip using CMOS process. With the color sensor applied, the brightness, and color temperature of backlight can be adjusted base on ambient light source that makes panel looks more comfortable for end user's eyes. VEML6040's adoption of Filtron TM technology achieves the closest ambient light spectral sensitivity to real human eye responses. VEML6040 provides excellent temperature compensation capability for keeping the output stable under changing temperature. VEML6040's function are easily operated via the simple command format of I2C (SMBus compatible) interface protocol. VEML6040's operating voltage ranges from 2.5 V to 3.6 V.

Datasheet: VEML6040

Application note: VEML6040 AN

Usage

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

Please find additional examples using hardware in this repository: driver-examples

Support

For questions, issues, feature requests, and other changes, please file an issue in the github project.

License

Licensed under either of

  • Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Information - Updated Oct 05, 2021

Stars: 2
Forks: 1
Issues: 0

RGB (Rust Game Boy) is a simple emulator for the original game boy and the...

RGB (Rust Game Boy) is a simple emulator for the original game boy and the color game boy

RGB (Rust Game Boy) is a simple emulator for the original game boy and the...

A dead simple ANSI terminal color painting library for Rust

See the ansi_term, term_painter, to name a few), begging the question: why yet another? Here

A dead simple ANSI terminal color painting library for Rust

a tool to analyze file system usage written in Rust

coloured output, according to the LS_COLORS environment variable

a tool to analyze file system usage written in Rust

A Gameboy Color (GBC) emulator written in Rust

There are two types of tests:

A Gameboy Color (GBC) emulator written in Rust

Convenience Rust code that handles coordinate transformations, Jones matrices,

The library dir can be specified manually with ERFA_LIB

Convenience Rust code that handles coordinate transformations, Jones matrices,

This is a Rust library for geographic coordinate frame conversion

All the functions are implemented in f64 precision

This is a Rust library for geographic coordinate frame conversion

A rust library for colorizing tracing_error::SpanTrace objects in the style

A rust library for colorizing color-backtrace

A rust library for colorizing tracing_error::SpanTrace objects in the style
Facebook Instagram Twitter GitHub Dribbble
Privacy