Part Number: OPT4001-Q1
Other Parts Discussed in Thread: OPT4001, OPT3001
Hi team
Customer is evaluating our OPT4001-Q1, can you provide some sample code to work with OPT4001-Q1?
Driver code including .c and .h file is needed.
Br
Hanbing
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: OPT4001-Q1
Other Parts Discussed in Thread: OPT4001, OPT3001
Hi team
Customer is evaluating our OPT4001-Q1, can you provide some sample code to work with OPT4001-Q1?
Driver code including .c and .h file is needed.
Br
Hanbing
Hello Hanbing,
We do not currently have sample code for OPT4001.
Here is driver code specifically for OPT3001: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/iio/light/opt3001.c
The code would require many changes in order to work with OPT4001 since the register maps and configuration is different. The lux calculation is also different for the OPT4001. Please refer to the datasheet for information on how to configure the device.
Thank you,
Joseph Scherphorn