-
• #2
This is on an MDBT42Q btw.
-
• #3
I'm not sure I understand the question... The ICM20948 is a 9 axis acceleration sensor?
Usually if you want to get a callback when there's movement from an accelerometer you configure the sensor so that it changes the state of its INT pin when the moment happens - then you just connect that wire to Espruino and
setWatch
on that. -
• #4
Unfortunately, the PCB that I'm using doesn't have the INT pin connected to the MDBT42Q. That's why I'm trying to configure a software setWatch equivalent by watching the register or a variable. I hope that makes sense?
-
• #5
I just set up a small function to read every 50ms and calculate the euclidian distance with the previous value and it works fine. Thanks!
-
• #6
Ok, great! But yes - just to confirm - that's about the only thing you could do (read continuously and check the values).
-
• #7
would you mind sharing reading the icm20948 process?
I'm trying to set up a setWatch equivalent for the ICM20948. Is there anyway I can use the function on a variable or a simple way I can set up an equivalent function to watch a variable?