-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: sensor: Add Vishay VEML6031 Ambient Light Sensor #84563
base: main
Are you sure you want to change the base?
Conversation
1837154
to
739762c
Compare
This sample uses the VEML6031 sensor controlled using the I2C-2 interface at | ||
the Olimex-STM32-E407 board on feather PF0 and PF1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a feather board available with this sensor or did you hand-wire something up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got the sensor on a breakout board from the vendor Vishay and connected it manually to the Olimex board.
Add this sensor to |
65867d2
to
cf4fd60
Compare
cf4fd60
to
ea8df30
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few final optimizations, then I think this is good to go.
ea8df30
to
eb29e71
Compare
test_i2c_veml6031: veml6031@29 { | ||
compatible = "vishay,veml6031"; | ||
reg = <0x29>; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to go at the end of the file with an I2C bus address incremented by one from the previous node. This is a build-only test so the address doesn't need to match the datasheet.
samples/sensor/veml6031/prj.conf
Outdated
CONFIG_GPIO=y | ||
CONFIG_SHELL=y | ||
CONFIG_I2C=y | ||
CONFIG_I2C_STM32=y | ||
CONFIG_SENSOR=y | ||
CONFIG_SENSOR_SHELL=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of these Kconfigs aren't needed.
CONFIG_GPIO=y | |
CONFIG_SHELL=y | |
CONFIG_I2C=y | |
CONFIG_I2C_STM32=y | |
CONFIG_SENSOR=y | |
CONFIG_SENSOR_SHELL=y | |
CONFIG_SENSOR=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reviews.
eb29e71
to
e50af49
Compare
- add driver for Vishay VEML6031 High Accuracy Ambient Light Sensor. - add new compatible "vishay,veml6031". - read and write consecutive 8 bit registers as bulk operation. - add driver to build all test of sensors. - support fetch and get. - triggered mode and interrupt is not yet supported. Signed-off-by: Andreas Klinger <ak@it-klinger.de>
- Test all attribute combinations of Vishay sensor VEML6031 which is an ambient light sensor. - Print out saturation case of sensor. - Idea is to be able to find a good combination of attributes for an optimal working area. Signed-off-by: Andreas Klinger <ak@it-klinger.de>
e50af49
to
7f1fccb
Compare
VEML6031 Sensor driver:
Sample application:
ambient light sensor.
optimal working area.