重力センサと照度センサの情報取得は出来た。
monitor-sensor というコマンドを叩くと、重力方向と照度情報が出力されることがわかった。以下実行結果(端末を傾けたり、センサを指で覆ったりして数値を変化させている)
$ monitor-sensor
Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: undefined)
=== Has ambient light sensor (value: 88.704004, unit: lux)
=== No proximity sensor
Light changed: 64.176003 (lux)
Accelerometer orientation changed: normal
Light changed: 16.800001 (lux)
Light changed: 2.688000 (lux)
Light changed: 4.368000 (lux)
Light changed: 3.024000 (lux)
Light changed: 1.344000 (lux)
Accelerometer orientation changed: left-up
Light changed: 9.408000 (lux)
Light changed: 12.768001 (lux)
Accelerometer orientation changed: normal
Light changed: 4.032000 (lux)
Light changed: 79.296004 (lux)
Light changed: 104.160005 (lux)
Light changed: 97.776005 (lux)