I am reading sensor data off of a Dell gateway, and noticing that the sensor data at iio:device2 seems to have a delay of ~1 second when reading using cat /sys/bus/iio/devices/iio:device2/in_temp_raw
or similar. This sensor is identified as an ST Micro LPS22HB pressure sensor in the manual. When I read the same off device0 (an ST Micro HTS221 temperature/humidity sensor) any delay is imperceptible.
I don't know the IIO subsystem well at all but I'm wondering what the reason for this delay is? My best guess is that the pressure sensor needs to use multiple readings spaced over some period of time to report its status but I would love to understand better.
iio_info
give you similar delays? Does hardware have a hysteresis when measuring a single value? Datasheet mentions FIFO mode, etc st.com/resource/en/application_note/… Have you setup the measurement frequency? As far as the ODR setting is concerned, ranging in active mode among 1,10,25,50, 75 Hz,