Users Guide
Pressure sensor ST Micro LPS22HB
Retrieve the raw data from the sensors by running the following commands. Then, apply the formula in the table to convert the data
collected into measurements such as relative humidity and temperature.
Retrieving raw data from sensors
• To query sensor devices, run the command.
$ cat /sys/bus/iio/devices/iio:device*/name
hts221 <-- device0, Humidity and temp.
lng2dm_accel <-- device1, G-sensor
lps22hb <-- device2, Pressure
• To retrieve data from the humidity and temperature sensor, run the command.
$ cat in_humidityrelative_offset
$ cat in_humidityrelative_raw
$ cat in_humidityrelative_scale
$ cat in_temp_offset
$ cat in_temp_raw
$ cat in_temp_scale
• To retrieve data from the motion sensor, run the command.
$ cat in_accel_scale_available
$ cat in_accel_*_scale
$ cat in_accel_*_raw
• To retrieve data from the pressure sensor, run the command.
$ cat in_pressure_raw
$ cat in_pressure_scale
Converting raw data for use
Apply the formula in the table to convert the raw data collected into usable measurements.
Table 12. Convert relative humidity and temperature sensor raw data
Relative humidity and temperature sensor ST Micro HTS221
RH (in %) = (in_humidityrelative_raw + in_humidityrelative_offset) * in_humidityrelative_scale
Temperature (degC) = (in_temp_raw + in_temp_offset) * in_temp_scale
Table 13. Convert motion sensor raw data
Motion sensor—Accelerometer ST Micro LNG2DMTR
accel_{x/y/z} (m/s^2) = in_accel_{x/y/z}_raw * in_accel_{x/y/z}_scale
Table 14. Convert pressure sensor raw data
Pressure sensor ST Micro LPS22HB
Pressure (hPa) = in_pressure_raw * in_pressure_scale * 10
Temperature (m degC) = in_temp_raw * in_temp_scale
Ignition Pin
The ignition pin can be used to wake the system from S3, S4, and S5 power states. The user can use the operating system power
management to configure S3, S4, and S5 power states and shutdown.
NOTE: For more information about configuring the ignition pin (using the system.power-key-action command), see https://
docs.ubuntu.com/core/en/reference/core-configuration.
Specify the action to take when the power button is pressed.
57