Hi, I tried to set a threshold trigger by setting the lower and upper threshold with

rc = sensor_attr_set(sensor, SENSOR_CHAN_ALL,
SENSOR_ATTR_LOWER_THRESH,
3);
but rc is returned with -134 which is not supported.
(It doesnt mater if I use SENSOR_CHAN_ACCEL_XYZ or SENSOR_CHAN_ACCEL_X or SENSOR_CHAN_ALL)

Is it really not supported? (so I have to do the check myself)

best regards,
markus

    markusschweitzer the accel code uses the driver thatโ€™s included with Zephyr. I have not checked this in-depth whether they cover all the features of the LIS2DH. As you guessed, you may have to check/process this manually.

      jaredwolff I already found it in lis2dh_trigger.c. If INT2 is not connected only trig->type == SENSOR_TRIG_DATA_READY && trig->chan == SENSOR_CHAN_ACCEL_XYZ is supported (with the default driver) ๐Ÿ™

        markusschweitzer aggh sorry about that. Despite there being a lot of work put into Zephyr it can still be rough. (Free isnโ€™t always complete!) Would it have helped if INT2 was connected?

        @jaredwolff not your fault ๐Ÿ™‚ It would add some functionality, but first before adding new hardware the default zephyr driver for this should be extended since it is very limited (according to the datasheet the lis2dh12tr is able to do MUCH more). Thanks for the quick anwser.

          Terms and Conditions | Privacy Policy