- Edited
100% agree. Especially if you need something accurate.
100% agree. Especially if you need something accurate.
The reason I suggested the temperature code snippet, was that it was in the original sample in the Zephyr samples. And yes the temperature measurement is not very accurate, I have used ADT7410 in another project and it worked well.
using the suggested code by AchimKraus for an open jmp3
irq-gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
anym-on-int1;
does not work with the original sample for me. creation of the data trigger fails with -134. It does work however, if triggering is via slope. This could be a bug in the Zephyr driver, but I have not investigated it.
does not work with the original sample for me.
The original sample in “nfed/samples/accelerometer”?
Which NCS version?
yes, and 2.4.0
I use the LIS2DH on a feather v5 with NCS-2.3.0.
My understanding of the dts snippet is, it uses one interrupt GPIO in (30) and routes the any-motion event also to that. That works with my own code.
The sample in “nfed/samples/accelerometer" comes with an own board overlay. Where did you put the snippet? In the general board dts? Or in the projects board dts?
.accelerometer\boards\circuitdojo_feather_nrf9160_ns.overlay
My bad, you’re right.
I only used the SENSOR_TRIG_DELTA and with that it works. I assumed, that “anym-on-int1” allows to use int1 for both. That’s wrong. Seems, that selecting the trigger could not be done only in the code, it requires to use the specific overlay.
[00:00:00.483,184] <dbg> lis2dh: lis2dh_init_interrupt: gpio_drdy not defined in DT
[00:00:00.483,245] <inf> lis2dh: lis2dh@18: int2 on gpio@842500.30
[00:00:00.485,412] <inf> lis2dh: fs=2, odr=0×4 lp_en=0×0 scale=9576
[00:00:00.488,525] <err> lis2dh: trigger_set DRDY int not supported