setWatch equivalent for I2C? #4252
Replies: 1 comment
-
Posted at 2021-03-24 by geek_god This is on an MDBT42Q btw. Posted at 2021-03-24 by @gfwilliams 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 Posted at 2021-03-24 by geek_god 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? Posted at 2021-03-24 by geek_god 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! Posted at 2021-03-25 by @gfwilliams Ok, great! But yes - just to confirm - that's about the only thing you could do (read continuously and check the values). Posted at 2023-11-21 by user156978 would you mind sharing reading the icm20948 process? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-03-24 by geek_god
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?
Beta Was this translation helpful? Give feedback.
All reactions