Ambient Light Sensor - bh7121fvc

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ambient Light Sensor - bh7121fvc

489 Views
deeksha
Contributor III

Hi ,

I am using bh7121fvc light ambient sensor on i.MX8M Mini L5.4.70. I need some technical information on this module.I had used bh7150.c driver. bh7121 module is detected while system booting.

Q1. >>What are the below values mentioned below, are these are register? which register have to read for lux value

i2cdump -f -y 2 0x23

root@iWave-G39H:~# i2cdump -f -y 2 0x23
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
10: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
20: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
30: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
40: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
50: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
60: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
70: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
80: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
90: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
a0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
c0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
d0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
e0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????
f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ????????????????


Q2. >>I got below values when checked through rootfs, what is this value for ?

root@root:~# cat /sys/class/i2c-dev/i2c-2/device/2-0023/driver/2-0023/iio\:device0/
consumers in_illuminance_integration_time in_illuminance_scale name power/ suppliers
dev in_illuminance_raw integration_time_available of_node/ subsystem/ uevent
root@root:~# cat /sys/class/i2c-dev/i2c-2/device/2-0023/driver/2-0023/iio\:device0/in_illuminance_raw
991


>> What are the 02 and 991 values I got through Q1 and Q2, which is the correct lux value to be read? Any calculation have to be done on above received value


Thanks in advance,
Looking forward for your reply.

Regards,
Deeksha

0 Kudos
1 Reply

475 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Q1. >>What are the below values mentioned below, are these are register? which register have to read for lux value

--> Yes, it shows registers and register's value.You need see bh7121fvc register guide to find which register can read lux.

 

I got below values when checked through rootfs, what is this value for ?

root@root:~# cat /sys/class/i2c-dev/i2c-2/device/2-0023/driver/2-0023/iio\:device0/in_illuminance_raw
991

--->Reference links:

https://github.com/mikhail-m1/illuminanced

https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio

 

 

0 Kudos