43
DMI-1210
4.2
Reading the Ambient Light Sensor
The DMI-1210 is equipped with an Everlight DCDIC-17 ambient
light sensor. Below is a sample application to read out the ADC
values and calculate the illuminance in lux.
// visit folder to compile application
# cd $APP_ALS/
# gcc als_read.c -o als_read
//perform test application to read out Lux value
# ./als_read
//sample logs
root@adlink-SP-AL:/home/adlink/ALS# ./als_read
[DBG] :seeking /dev/i2c-1
[DBG] :write data 0x00 fail
[DBG] :read data failure
[DBG] :seeking /dev/i2c-2
[DBG] :write data 0x00 fail
...
[DBG] :read data failure
[DBG] :seeking /dev/i2c-10
[DBG] :write data 0x00 fail
[DBG] :read data failure
[DBG] :seeking /dev/i2c-11
[DBG] :found
[DBG] :UPDATE=0x01
CH0=3092
CH1=962
LUX=19.170000
[DBG] :UPDATE=0x01
CH0=3104
CH1=966
LUX=19.241999
Summary of Contents for DMI-1210
Page 8: ...viii Table of Contents Leading EDGE COMPUTING This page intentionally left blank...
Page 10: ...x List of Figures Leading EDGE COMPUTING This page intentionally left blank...
Page 12: ...xii List of Tables Leading EDGE COMPUTING This page intentionally left blank...
Page 16: ...4 Leading EDGE COMPUTING This page intentionally left blank...
Page 26: ...14 Leading EDGE COMPUTING This page intentionally left blank...
Page 31: ...19 DMI 1210 2 Install the PC 104 MVB module with four M3 screws as shown MVB Module M3 Screws...
Page 43: ...31 DMI 1210 11 Wi Fi To install the Wi Fi driver do the following Open the Device Manager...
Page 45: ...33 DMI 1210 Select Browse my computer for driver softwaret...
Page 51: ...39 DMI 1210 Wi Fi will now be functional...
Page 66: ...54 Leading EDGE COMPUTING This page intentionally left blank...