-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add driver for Vishay RGBIR sensor VEML6046 #90091
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
Conversation
it-klinger
commented
May 17, 2025
- add driver for Vishay VEML6046 RGBIR color sensor
- add new compatible "vishay,veml6046"
- support fetch and get sensor subsystem operations
- triggered mode and interrupts are not yet supported
- add attribution test application which tests all attribute combinations
| uint32_t green_lux; | ||
| uint32_t blue_lux; | ||
| uint32_t ir_lux; | ||
| uint32_t int_flags; |
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.
unused?
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.
Unused. I'll remove.
| case SENSOR_ATTR_LOWER_THRESH: | ||
| val->val1 = data->thresh_low; | ||
| break; | ||
| case SENSOR_ATTR_UPPER_THRESH: | ||
| val->val1 = data->thresh_high; | ||
| break; |
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.
should convert back to lux
| return ret; | ||
| } | ||
|
|
||
| ret = veml6046_read16(dev, VEML6046_CMDCODE_INT_L, val); |
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.
may want to actually check ret?
samples/sensor/veml6046/src/main.c
Outdated
| sensor_channel_get(dev, SENSOR_CHAN_RED, &red); | ||
| sensor_channel_get(dev, SENSOR_CHAN_VEML6046_RED_RAW_COUNTS, &red_raw); | ||
|
|
||
| sensor_channel_get(dev, SENSOR_CHAN_RED, &green); |
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.
| sensor_channel_get(dev, SENSOR_CHAN_RED, &green); | |
| sensor_channel_get(dev, SENSOR_CHAN_GREEN, &green); |
samples/sensor/veml6046/src/main.c
Outdated
| sensor_channel_get(dev, SENSOR_CHAN_RED, &green); | ||
| sensor_channel_get(dev, SENSOR_CHAN_VEML6046_GREEN_RAW_COUNTS, &green_raw); | ||
|
|
||
| sensor_channel_get(dev, SENSOR_CHAN_RED, &blue); |
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.
| sensor_channel_get(dev, SENSOR_CHAN_RED, &blue); | |
| sensor_channel_get(dev, SENSOR_CHAN_BLUE, &blue); |
samples/sensor/veml6046/src/main.c
Outdated
| sensor_channel_get(dev, SENSOR_CHAN_RED, &blue); | ||
| sensor_channel_get(dev, SENSOR_CHAN_VEML6046_BLUE_RAW_COUNTS, &blue_raw); | ||
|
|
||
| sensor_channel_get(dev, SENSOR_CHAN_RED, &ir); |
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.
| sensor_channel_get(dev, SENSOR_CHAN_RED, &ir); | |
| sensor_channel_get(dev, SENSOR_CHAN_IR, &ir); |
565677d to
d7051b9
Compare
|
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
|
Hi, |
It will be possible as soon as you restore https://github.com/it-klinger/zephyr/tree/add-veml6046 to commit d7051b9 which is what it was when the PR was closed. Hope this helps! |
|
Hi Benjamin, |
It's only when the branch is exactly at that commit that reopening will be possible. The follow-up commit will have to be done afterwards |
And right now neither of the two commits are d705 anyway main...it-klinger:zephyr:add-veml6046 |
|
Now it's at d705 but i'm only able to open a PR with a new number (#94305), but the closed one is not opened. |
0f2518f
0f2518f to
d03591d
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.
Thank you for the successive modifications and improvements!
|
Rebase needed |
d03591d to
fd51dde
Compare
- add driver for Vishay VEML6046 RGBIR color sensor - add new compatible "vishay,veml6046" - support fetch and get sensor subsystem operations - triggered mode and interrupts are not yet supported Signed-off-by: Andreas Klinger <[email protected]>
- Test all attribute combinations of Vishay RGBIR color sensor VEML6046. - Print OVERFLOW in case of saturation of sensor. - This small program is intended to be helping when finding appropriate attributes for an application of the sensor. Signed-off-by: Andreas Klinger <[email protected]>
|
Just rebased. |
|
Reopened. |
6977338
- create common header file veml60xx-common.h for sensors VEML6031 and VEML6046. Signed-off-by: Andreas Klinger <[email protected]>
6977338 to
1555f5a
Compare
|
|
Rebasing done. |


