REL 1.0
Page 63 of 69
iWave Systems Technologies Pvt. Ltd.
iW-RainboW-G15D Linux User Manual
5.9.3
Barometer
To display the barometer name, execute the below command.
root@iWave-G15/$cat /sys/class/hwmon/hwmon0/device/name
To enable the barometer, execute the below command.
root@iWave-G15/$echo 1 > /sys/class/hwmon/hwmon0/device/enable
To read the values from barometer, execute the below command and the read values will be printed in the
console.
root@iWave-G15/$echo <no of times> > /sys/class/hwmon/hwmon0/device/read
Example
root@iWave-G15/$echo 100 > /sys/class/hwmon/hwmon0/device/read
To power off/shut down the barometer, execute the below command.
root@iWave-G15/$echo 0 > /sys/class/hwmon/hwmon0/device/enable
5.9.4
Light sensor
To display the light sensor name, execute the below command.
root@iWave-G15/$cat /sys/class/i2c-dev/i2c-1/device/1-0044/name
Light sensor supported modes are listed below
0 - Power off mode
1 - ALS ONCE mode
2 - IR ONCE mode
5 - ALS CONTINUOUS mode
6 - IR CONTINUOUS mode
To set the light sensor mode, execute the below command.
root@iWave-G15/$echo <mode> > /sys/class/i2c-dev/i2c-1/device/1-0044/mode
Example
root@iWave-G15/$echo 5 > /sys/class/i2c-dev/i2c-1/device/1-0044/mode
To read the values from light sensor, execute the below command and the read values will be printed in the
console.
root@iWave-G15/$echo <no of times> > /sys/class/i2c-dev/i2c-1/device/1-0044/read
Example
root@iWave-G15/$echo 100 > /sys/class/i2c-dev/i2c-1/device/1-0044/read
To power off/shut down the light sensor, execute the below command.
root@iWave-G15/$echo 0 > /sys/class/i2c-dev/i2c-1/device/1-0044/mode