ReliaGATE 10-12 User manual Rev. 2-1
12.16 How to output Accelerometer and Gyroscope values
The ReliaGATE 10-12 includes a 3D digital accelerometer / 3D digital gyroscope:
The accelerometer is exposed as cat /sys/bus/iio/devices/iio\:device1
l
The gyroscope is exposed as cat /sys/bus/iio/devices/iio\:device0
l
To output the three-dimensional values for the accelerometer, use the following commands:
watch -n 1 cat /sys/bus/iio/devices/iio\:device1/in_anglvel_x_raw
watch -n 1 cat /sys/bus/iio/devices/iio\:device1/in_anglvel_y_raw
watch -n 1 cat /sys/bus/iio/devices/iio\:device1/in_anglvel_z_raw
To output the three-dimensional values for the gyroscope, use the following commands:
watch -n 1 cat /sys/bus/iio/devices/iio\:device0/in_accel_x_raw
watch -n 1 cat /sys/bus/iio/devices/iio\:device0/in_accel_y_raw
watch -n 1 cat /sys/bus/iio/devices/iio\:device0/in_accel_z_raw
12 How to manage interfaces in Linux
89 / 118